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 7 Next »

The FSEntry_Query() function gets information about file system entry, including its attributes, which indicate whether it is a file or directory, writable or read-only, and visible or hidden (see ).

The return value is a logical OR of attribute flags:

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.

FS_ENTRY_ATTRIB_DIR

Entry is a directory.

FS_ENTRY_ATTRIB_ROOT_DIR

Entry is a root directory.

If no error is returned and FS_ENTRY_ATTRIB_DIR is not set, then the entry is a file.

An entry can be made read-only (or writable) or hidden (or visible) by setting its attributes:

The second argument should be the logical OR of relevant attribute flags.

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.

If a flag is clear (not OR’d in), then that attribute will be clear. In the example above, the entry will be made read-only (i.e., not writable) and will be visible (i.e., not hidden) since the WR and HIDDEN flags are not set in attrib. Since there is no way to make files write-only (i.e., not readable), the RD flag should always be set.

  • No labels