18 KiB
[fs.enum]
31 Input/output library [input.output]
31.12 File systems [filesystems]
31.12.8 Enumerations [fs.enum]
31.12.8.1 Enum path::format [fs.enum.path.format]
This enum specifies constants used to identify the format of the character sequence, with the meanings listed in Table 148.
Table 148 — Enum path::format [tab:fs.enum.path.format]
| ð Name |
Meaning |
|---|---|
| ð native_format |
The native pathname format. |
| ð generic_format |
The generic pathname format. |
| ð auto_format |
The interpretation of the format of the character sequence is implementation-defined. The implementation may inspect the content of the character sequence to determine the format. Recommended practice: For POSIX-based systems, native and generic formats are equivalent and the character sequence should always be interpreted in the same way. |
31.12.8.2 Enum class file_type [fs.enum.file.type]
This enum class specifies constants used to identify file types, with the meanings listed in Table 149.
The values of the constants are distinct.
Table 149 — Enum class file_type [tab:fs.enum.file.type]
| ð Constant |
Meaning |
|---|---|
| ð none |
The type of the file has not been determined or an error occurred while trying to determine the type. |
| ð not_found |
Pseudo-type indicating the file was not found. [Note 1: The file not being found is not considered an error while determining the type of a file. â end note] |
| ð regular |
Regular file |
| ð directory |
Directory file |
| ð symlink |
Symbolic link file |
| ð block |
Block special file |
| ð character |
Character special file |
| ð fifo |
FIFO or pipe file |
| ð socket |
Socket file |
| ð implementation-defined |
Implementations that support file systems having file types in addition to the above file_type types shall supply implementation-defined file_type constants to separately identify each of those additional file types |
| ð unknown |
The file exists but the type cannot be determined |
31.12.8.3 Enum class copy_options [fs.enum.copy.opts]
The enum class type copy_options is a bitmask type ([bitmask.types]) that specifies bitmask constants used to control the semantics of copy operations.
The constants are specified in option groups with the meanings listed in Table 150.
The constant none represents the empty bitmask, and is shown in each option group for purposes of exposition; implementations shall provide only a single definition.
Every other constant in the table represents a distinct bitmask element.
Table 150 — Enum class copy_options [tab:fs.enum.copy.opts]
| ð Option group controlling copy_file function effects for existing target files |
|
|---|---|
| ð Constant |
Meaning |
| ð none |
(Default) Error; file already exists. |
| ð skip_existing |
Do not overwrite existing file, do not report an error. |
| ð overwrite_existing |
Overwrite the existing file. |
| ð update_existing |
Overwrite the existing file if it is older than the replacement file. |
| ð Option group controlling copy function effects for subdirectories |
|
| ð Constant |
Meaning |
| ð none |
(Default) Do not copy subdirectories. |
| ð recursive |
Recursively copy subdirectories and their contents. |
| ð Option group controlling copy function effects for symbolic links |
|
| ð Constant |
Meaning |
| ð none |
(Default) Follow symbolic links. |
| ð copy_symlinks |
Copy symbolic links as symbolic links rather than copying the files that they point to. |
| ð skip_symlinks |
Ignore symbolic links. |
| ð Option group controlling copy function effects for choosing the form of copying |
|
| ð Constant |
Meaning |
| ð none |
(Default) Copy content. |
| ð directories_only |
Copy directory structure only, do not copy non-directory files. |
| ð create_symlinks |
Make symbolic links instead of copies of files. The source path shall be an absolute path unless the destination path is in the current directory. |
| ð create_hard_links |
Make hard links instead of copies of files. |
31.12.8.4 Enum class perms [fs.enum.perms]
The enum class type perms is a bitmask type ([bitmask.types]) that specifies bitmask constants used to identify file permissions, with the meanings listed in Table 151.
Table 151 — Enum class perms [tab:fs.enum.perms]
| ð Name |
Value | POSIX | Definition or notes |
|---|---|---|---|
| ð | (octal) | macro | |
| ð none |
0 | There are no permissions set for the file. | |
| ð owner_read |
0400 | S_IRUSR | Read permission, owner |
| ð owner_write |
0200 | S_IWUSR | Write permission, owner |
| ð owner_exec |
0100 | S_IXUSR | Execute/search permission, owner |
| ð owner_all |
0700 | S_IRWXU | Read, write, execute/search by owner; owner_read |
| ð group_read |
040 | S_IRGRP | Read permission, group |
| ð group_write |
020 | S_IWGRP | Write permission, group |
| ð group_exec |
010 | S_IXGRP | Execute/search permission, group |
| ð group_all |
070 | S_IRWXG | Read, write, execute/search by group; group_read |
| ð others_read |
04 | S_IROTH | Read permission, others |
| ð others_write |
02 | S_IWOTH | Write permission, others |
| ð others_exec |
01 | S_IXOTH | Execute/search permission, others |
| ð others_all |
07 | S_IRWXO | Read, write, execute/search by others; others_read |
| ð all |
0777 | owner_all | |
| ð set_uid |
04000 | S_ISUID | Set-user-ID on execution |
| ð set_gid |
02000 | S_ISGID | Set-group-ID on execution |
| ð sticky_bit |
01000 | S_ISVTX | Operating system dependent. |
| ð mask |
07777 | all | |
| ð unknown |
0xFFFF | The permissions are not known, such as when a file_status object is created without specifying the permissions |
31.12.8.5 Enum class perm_options [fs.enum.perm.opts]
The enum class type perm_options is a bitmask type ([bitmask.types]) that specifies bitmask constants used to control the semantics of permissions operations, with the meanings listed in Table 152.
The bitmask constants are bitmask elements.
In Table 152 perm denotes a value of type perms passed to permissions.
Table 152 — Enum class perm_options [tab:fs.enum.perm.opts]
| ð Name |
Meaning |
|---|---|
| ð replace |
permissions shall replace the file's permission bits with perm |
| ð add |
permissions shall replace the file's permission bits with the bitwise or of perm and the file's current permission bits. |
| ð remove |
permissions shall replace the file's permission bits with the bitwise and of the complement of perm and the file's current permission bits. |
| ð nofollow |
permissions shall change the permissions of a symbolic link itself rather than the permissions of the file the link resolves to. |
31.12.8.6 Enum class directory_options [fs.enum.dir.opts]
The enum class type directory_options is a bitmask type ([bitmask.types]) that specifies bitmask constants used to identify directory traversal options, with the meanings listed in Table 153.
The constant none represents the empty bitmask; every other constant in the table represents a distinct bitmask element.
Table 153 — Enum class directory_options [tab:fs.enum.dir.opts]
| ð Name |
Meaning |
|---|---|
| ð none |
(Default) Skip directory symlinks, permission denied is an error. |
| ð follow_directory_symlink |
Follow rather than skip directory symlinks. |
| ð skip_permission_denied |
Skip directories that would otherwise result in permission denied. |