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 Listing - Example FSEntry_Query() usage).
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
FS_FLAGS attrib; FS_ENTRY_INFO info; FSEntry_Query("path_name", /* pointer to full path name */ &info, /* pointer to info */ &err); /* return error */ attrib = info.Attrib; |
The return value is a logical OR of attribute flags:
FS_ENTRY_ATTRIB_RD
Entry is readable.
FS_ENTRY_ATTRIB_WR
...
The second argument should be the logical OR of relevant attribute flags.
Code Block | ||
---|---|---|
| ||
attrib = FS_ENTRY_ATTRIB_RD;
FSEntry_AttribSet("path_name", /* pointer to full path name */
attrib, /* attributes */
&err); /* return error */ |
FS_ENTRY_ATTRIB_RD
Entry is readable.
...