Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

void  FSEntry_AttribSet (CPU_CHAR  *name_full,
                         FS_FLAGS   attrib,
                         FS_ERR    *p_err);

File

Called from

Code enabled by

fs_entry.c

Application

not FS_CFG_RD_ONLY_EN

Set a file or directory’s attributes.

Arguments

name_full

Name of the entry. See section 4-3 “μC/FS File and Directory Names and Paths”.

attrib

Entry attributes to set (see Note #2).

p_err

Pointer to variable that will the receive return error code from this function:

FS_ERR_NONE

Entry attributes 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 (See section B-8 “Entry Error Codes”).

Returned Value

None.

Notes/Warnings

  • If the entry does not exist, an error is returned.
  • Three attributes may be modified by this function:
  • FS_ENTRY_ATTRIB_RD

    Entry is readable.

    FS_ENTRY_ATTRIB_WR

    Entry is writable.

    FS_ENTRY_ATTRIB_HIDDEN

    Entry is hidden from user-level processes.

    An attribute will be cleared if its flag is not OR’d into attrib. An attribute will be set if its flag is OR’d into attrib. If another flag besides these are set, then an error will be returned.

  • The attributes of the root directory may not be set.
    • No labels