Created on 2016-06-19.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4594.
Change [fs.op.status] as indicated:
file_status status(const path& p, error_code& ec) noexcept;-4- Effects: If possible, determines the attributes of the file p resolves to, as if by
-?- Let prms denote the result of (m & perms::mask), where m is determined as if by converting the st_mode member of the obtained struct stat to the type perms. -5- Returns:POSIX stat().using POSIX stat() to obtain a POSIX struct stat.. […]
If ec != error_code():
[…]
Otherwise
If the attributes indicate a regular file, as if by POSIX S_ISREG, returns file_status(file_type::regular, prms). […]
Otherwise, if the attributes indicate a directory, as if by POSIX S_ISDIR, returns file_status(file_type::directory, prms). […]
Otherwise, if the attributes indicate a block special file, as if by POSIX S_ISBLK, returns file_status(file_type::block, prms).
Otherwise, if the attributes indicate a character special file, as if by POSIX S_ISCHR, returns file_status(file_type::character, prms).
Otherwise, if the attributes indicate a fifo or pipe file, as if by POSIX S_ISFIFO, returns file_status(file_type::fifo, prms).
Otherwise, if the attributes indicate a socket, as if by POSIX S_ISSOCK, returns file_status(file_type::socket, prms).
Otherwise, returns file_status(file_type::unknown, prms).
Change [fs.op.symlink_status] as indicated:
file_status symlink_status(const path& p); file_status symlink_status(const path& p, error_code& ec) noexcept;-1- Effects: Same as status(), above, except that the attributes of p are determined as if by
-?- Let prms denote the result of (m & perms::mask), where m is determined as if by converting the st_mode member of the obtained struct stat to the type perms. -2- Returns: Same as status(), above, except that if the attributes indicate a symbolic link, as if by POSIX S_ISLNK, returns file_status(file_type::symlink, prms). The signature with argument ec returns file_status(file_type::none) if an error occurs.POSIX lstat()using POSIX lstat() to obtain a POSIX struct stat.
[ 2016-06 Oulu ]
Moved to P0/Ready during issues prioritization.
Friday: status to Immediate
[ 2016-06, Oulu ]
2720 is a related issue.
The current specification for status(p) and symlink_status(p) omits any mention on setting permissions() on the returned file_status. Obviously they should be set, but as currently specified the permissions() will always be perms::unknown.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-06-28 13:14:43 | admin | set | status: immediate -> wp |
2016-06-27 16:42:33 | admin | set | messages: + msg8207 |
2016-06-27 16:42:33 | admin | set | status: new -> immediate |
2016-06-22 05:30:04 | admin | set | messages: + msg8200 |
2016-06-21 23:18:16 | admin | set | messages: + msg8198 |
2016-06-19 00:00:00 | admin | create |