DirRemove (FB; Prefix fildrm)¶
FUNCTION_BLOCK DirRemove EXTENDS CBM.ETrigToA
This function block deletes a directory.
Contrary to the original CAA specification the directory may be removed even if it is opened via ”FILE.DirOpen”.
This behavior is dependent of the underlying operating system and file system.
- InOut:
Scope
Name
Type
Comment
Input
sDirName
CAA.FILENAME
Directory name
xRecursive
BOOL
TRUE: Remove all files and sub-directories, FALSE: Directory is only deleted, if empty, i.e. if no files and sub-directories are left; otherwise an error will be dumped
Output
eError
Local library error ID (5107 - FILE_NOT_EMPTY: Directory not empty; will be generated only if xRecursive = FALSE)