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