This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 22.214.171.124 [fs.enum.file_type], 126.96.36.199 [fs.enum.copy.opts], 188.8.131.52 [fs.enum.dir.opts] Status: C++17 Submitter: Richard Smith Opened: 2016-03-19 Last modified: 2017-08-01
View all other issues in [fs.enum.file_type].
View all issues with C++17 status.
The enum class std::filesystem::file_type specifies a collection of enumerators for describing the type of a file, but also specifies (1) the numeric values of the enumerators, and (2) that an implementation cannot extend the list with additional types known to it (and by extension, the standard cannot extend the list in future versions without breakage).
These both seem like mistakes in the design. I would suggest we remove the specification of numerical values, and maybe also
we allow implementations to add new implementation-defined value
we replace std::filesystem::file_type::unknown with a value that only means "exists but type could not be determined" and use implementation-specific values for other possibilities.
Similar overspecification exists for std::filesystem::copy_options and std::filesystem::directory_options, where again precise numerical values are specified.
Wed AM: Move to Tentatively Ready
Strike the "Value" column from:
Change 184.108.40.206 [fs.enum.file_type] Table 145 Enum class
file_type as indicated:
The type of the file has not been determined or an error occurred while trying to determine the type.
Pseudo-type indicating the file was not found. [ Note: The file not being found is not considered an error while determining the type of a file. —end note ]
Symbolic link file
Block special file
Character special file
FIFO or pipe file
The file does exist, but is of an operating system dependent type not covered by any of the other cases or the process does not have permission to query the file type