Code Block | ||
---|---|---|
| ||
void FSEntry_Create (CPU_CHAR *name_full, |
...
FS_FLAGS entry_type, |
...
CPU_BOOLEAN excl, |
...
FS_ERR *p_err); |
File | Called from | Code enabled by |
---|---|---|
| Application; | not |
Create a file or directory.
See also fs_mkdir()
.
Arguments
name_full
Name of the entry. See the sub-topic "µC/FS File and Directory Names and Paths" in the topic Useful Information.
...
Indicates whether the new entry shall be a directory or a file (see Note #1) :
FS_ENTRY_TYPE_DIR
, if the entry shall be a directory.
...
Indicates whether the creation of the new entry shall be exclusive (see Notes):
DEF_YES
, if the entry shall be created only if p_name_full
does not exist.
...
Returned Value
None.
Notes/Warnings
- If the entry exists and is a file, entry_type is
FS_ENTRY_TYPE_FILE
and excl isDEF_NO
, then the existing entry will be truncated. If the entry exists and is a directory and entry_type isFS_ENTRY_TYPE_DIR
, then no change will be made to the file system. - If the entry exists and is a directory, dir is
DEF_NO
and excl isDEF_NO
, then no change will be made to the file system. Similarly, if the entry exists and is a file, dir isDEF_YES
and excl isDEF_NO
, then no change will be made to the file system. - The root directory may not be created.