Deleting Files and Directories
A file or directory can be deleted using FSEntry_Del()
:
FSEntry_Del("\\dir", /* entry name */ FS_ENTRY_TYPE_DIR, /* means entry must be a dir */ &err); /* return error */
The second argument, entry_type, restricts deletion to specific types. If it is FS_ENTRY_TYPE_DIR
, then the entry specified by the first argument must be a directory; if it is a file, an error will be returned. If it is FS_ENTRY_TYPE_FILE
, then the entry must
be a file. If it is FS_ENTRY_TYPE_ANY
, then the entry will be deleted whether it is a file or a directory.