ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/DirectoryAccess/GetDirectorySizeInByte
The command gets the size of the specified directory in bytes.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bDirectoryAccessGetDirectorySizeInByte : BOOL;
OutputDataDirectoryAccessGetDirectorySizeInByte : ST_GetDirectorySizeInByteOutputData;
hrDirectoryAccessGetDirectorySizeInByte : HRESULT;
fbDirectoryAccess : FB_DirectoryAccess;
END_VAR
hrDirectoryAccessGetDirectorySizeInByte := fbDirectoryAccess.GetDirectorySizeInByte(
bExecute := bDirectoryAccessGetDirectorySizeInByte,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sFullPath := 'C:\Test',
OutputData => OutputDataDirectoryAccessGetDirectorySizeInByte);
IF hrDirectoryAccessGetDirectorySizeInByte <> S_FALSE THEN
bDirectoryAccessGetDirectorySizeInByte := 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".