Created on 2018-03-07.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4727.
Edit [fs.op.create_directory] as indicated:
bool create_directory(const path& p, const path& existing_p); bool create_directory(const path& p, const path& existing_p, error_code& ec) noexcept;-4- Effects:
Establishes the postcondition by attempting to createCreates the directory p resolves to, with attributes copied from directory existing_p. The set of attributes copied is operating system dependent. Creation failure because presolves to an existing directory shall not be treated asalready exists is not an error. [Note: For POSIX-based operating systems, the attributes are those copied by native API stat(existing_p.c_str(), &attributes_stat) followed by mkdir(p.c_str(), attributes_stat.st_mode). For Windows-based operating systems, the attributes are those copied by native API CreateDirectoryExW(existing_p.c_str(), p.c_str(), 0). — end note]-5- Postconditions: is_directory(p).[…]
[ 2018-06 Rapperswil: Adopted ]
[ 2018-03-27 Moved to Tentatively Ready after 6 positive votes on c++std-lib. ]
LWG 2935 clarified that create_directory is not supposed to report an error if exists(p), even if p is not a directory. However, the P/R there missed the existing_p overloads.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-06-12 01:05:16 | admin | set | messages: + msg9887 |
2018-06-12 01:05:16 | admin | set | status: voting -> wp |
2018-05-06 19:23:13 | admin | set | status: ready -> voting |
2018-03-31 12:07:05 | admin | set | messages: + msg9793 |
2018-03-31 12:07:05 | admin | set | status: new -> ready |
2018-03-24 20:08:17 | admin | set | messages: + msg9767 |
2018-03-07 00:00:00 | admin | create |