Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
languagecpp
void   FSEntry_Create (CPU_CHAR     *name_full,

...


                       FS_FLAGS      entry_type,

...


                       CPU_BOOLEAN   excl,

...


                       FS_ERR       *p_err);


File

Called from

Code enabled by

fs_entry.c

Application;
fs_mkdir()

not FS_CFG_RD_ONLY_EN

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

  1. If the entry exists and is a file, entry_type is FS_ENTRY_TYPE_FILE and excl is DEF_NO, then the existing entry will be truncated. If the entry exists and is a directory and entry_type is FS_ENTRY_TYPE_DIR, then no change will be made to the file system.
  2. If the entry exists and is a directory, dir is DEF_NO and excl is DEF_NO, then no change will be made to the file system. Similarly, if the entry exists and is a file, dir is DEF_YES and excl is DEF_NO, then no change will be made to the file system.
  3. The root directory may not be created.