FSEntry_Del()
void FSEntry_Del (CPU_CHAR *name_full, FS_FLAGS entry_type, FS_ERR *p_err);
File | Called from | Code enabled by |
---|---|---|
| Application; | not |
Delete a file or directory.
See also fs_remove()
and fs_rmdir()
.
Arguments
name_full
Pointer to character string representing the name of the entry. See the sub-topic "µC/FS File and Directory Names and Paths" in the topic Useful Information.
entry_type
Indicates whether the entry MAY be a file (see Notes #1 and #2):
FS_ENTRY_TYPE_DIR
if the entry must be a dir.
FS_ENTRY_TYPE_FILE
if the entry must be a file.
FS_ENTRY_TYPE_ANY
if the entry may be any type.
p_err
Pointer to variable that will the receive return error code from this function:
FS_ERR_NONE
Entry date/time set successfully.
FS_ERR_NAME_NULL
Argument name_full
passed a NULL pointer.
FS_ERR_NAME_INVALID
Entry name specified invalid OR volume could not be found.
FS_ERR_NAME_PATH_TOO_LONG
Entry name specified too long.
FS_ERR_VOL_NOT_OPEN
Volume was not open.
FS_ERR_VOL_NOT_MOUNTED
Volume was not mounted.
FS_ERR_BUF_NONE_AVAIL
Buffer not available.
FS_ERR_DEV
Device access error. Or entry error.
Returned Value
None.
Notes/Warnings
- When a file is removed, the space occupied by the file is freed and shall no longer be accessible.
- A directory can be removed only if it is an empty directory.
- The root directory cannot be deleted.