ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/FileAccess/GetFileInfo
The command returns the file properties of the specified file.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bFileAccessGetFileInfo : BOOL;
OutputDataFileAccessGetFileInfo : ST_GetFileInfoOutputData;
hrFileAccessGetFileInfo : HRESULT;
fbFileAccess : FB_FileAccess;
END_VAR
hrFileAccessGetFileInfo := fbFileAccess.GetFileInfo(
bExecute := bFileAccessGetFileInfo,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sfullPathSourceFile := 'C:\Test\text.txt',
OutputData => OutputDataFileAccessGetFileInfo);
IF hrFileAccessGetFileInfo <> S_FALSE THEN
bFileAccessGetFileInfo := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".