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