Feature Request
What feature are you suggesting?
Overview:
std::filesystem::path is hardcoded for supporting Windows (in addition to POSIX), to recognize what counts as a root name/path. See libstdc++-v3/src/c++17/fs_path.cc, the path::_Parser struct for details. Outside of Windows, the current implementation ignores root names (only a starting slash indicates root.)
But since newlib allows for devoptab entries to have a root name (e.g. on Wii U: fs:), it would be good to have support for this, so paths like fs:/vol/content/external01 could be recognized as absolute paths starting with a root name, instead of being misidentified as relative paths.
Smaller Details:
The implementation could be similar to the existing _GLIBCXX_FILESYSTEM_IS_WINDOWS fragments. The Windows version expects a single letter followed by the colon (e.g. C:) as the root name. For newlib, it would have to check the GetDeviceOpTab() function, to find if the root is a valid device name known by newlib.
Nature of Request:
Why would this feature be useful?
C++ software can check if a std::filesystem::path is absolute, and contains a root name. It's nice to have them work out of the box, when porting code.
Feature Request
What feature are you suggesting?
Overview:
std::filesystem::pathis hardcoded for supporting Windows (in addition to POSIX), to recognize what counts as a root name/path. Seelibstdc++-v3/src/c++17/fs_path.cc, thepath::_Parserstruct for details. Outside of Windows, the current implementation ignores root names (only a starting slash indicates root.)But since newlib allows for devoptab entries to have a root name (e.g. on Wii U:
fs:), it would be good to have support for this, so paths likefs:/vol/content/external01could be recognized as absolute paths starting with a root name, instead of being misidentified as relative paths.Smaller Details:
The implementation could be similar to the existing
_GLIBCXX_FILESYSTEM_IS_WINDOWSfragments. The Windows version expects a single letter followed by the colon (e.g.C:) as the root name. For newlib, it would have to check theGetDeviceOpTab()function, to find if the root is a valid device name known by newlib.Nature of Request:
Why would this feature be useful?
C++ software can check if a
std::filesystem::pathis absolute, and contains a root name. It's nice to have them work out of the box, when porting code.