ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/DirectoryAccess/GetDirectoryByIndex
The command returns the properties of the directory with the specified index that is located in the specified directory.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bDirectoryAccessGetDirectoryByIndex : BOOL;
OutputDataDirectoryAccessGetDirectoryByIndex : ST_GetDirectoryByIndexOutputData;
hrDirectoryAccessGetDirectoryByIndex : HRESULT;
fbDirectoryAccess : FB_DirectoryAccess;
END_VAR
hrDirectoryAccessGetDirectoryByIndex := fbDirectoryAccess.GetDirectoryByIndex(
bExecute := bDirectoryAccessGetDirectoryByIndex,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sFullPath := 'D:\Test',
nIndex := 0,
OutputData => OutputDataDirectoryAccessGetDirectoryByIndex);
IF hrDirectoryAccessGetDirectoryByIndex <> S_FALSE THEN
bDirectoryAccessGetDirectoryByIndex := 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".