File.GetAttribute

Navigation:  Libraries > CT File Access > Function Blocks - File Services >

File.GetAttribute

Previous pageReturn to chapter overviewNext page

With this function block of the CAA_File.library directory and file attributes can be retrieved. It is optional for the different targets. Whether this function block is implemented or not is explicitly stated and encoded in the return value of the function ”FILE.GetProperty”(see description of File.GetProperty).

Inputs:

xExecute

 

BOOL

Rising edge: Action start

Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle.

hFile

CAA.HANDLE

Handle of the directory or the file

 

Outputs:

xDone

 

BOOL

 

Action successfully completed

xBusy

BOOL

Function block active

xError

BOOL

TRUE: error occurred, function block aborts action FALSE: no error

 

eError

FILE.ERROR

Local library error ID (0: no error; 5101: time out)

eFileAttrib

FILE.ATTRIB

Specific outputs