This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
Section: 188.8.131.52 [fs.op.create_directories], 184.108.40.206 [fs.op.create_directory] Status: WP Submitter: Billy Robert O'Neal III Opened: 2017-02-15 Last modified: 2017-11-13
View all issues with WP status.
The create_directory and create_directories functions have a postcondition that says is_directory(p), but it is unclear how they are supposed to provide this. Both of their effects say that they create a directory and return whether it was actually created. It is possible to interpret this as "if creation fails due to the path already existing, issue another system call to see if the path is a directory, and change the result if so" — but it seems unfortunate to require both Windows and POSIX to issue more system calls in this case.In email discussion Davis Herring and Billy O'Neal discussed this issue and agreed that this was probably unintentional. Special thanks for Jonathan Wakely's suggested change to create_directories' Returns clause.
[2017-07 Toronto Thurs Issue Prioritization]
Priority 0; move to Ready
This wording is relative to N4640.
Make the following edits to 220.127.116.11 [fs.op.create_directories]:
bool create_directories(const path& p); bool create_directories(const path& p, error_code& ec) noexcept;
Establishes the postcondition by calling create_directory() for any element of p that does not exist.
-5- Complexity: 𝒪(n) where n is the number of elements of p
that do not exist.
Make the following edits to 18.104.22.168 [fs.op.create_directory]:
bool create_directory(const path& p); bool create_directory(const path& p, error_code& ec) noexcept;
Establishes the postcondition by attempting to create the directory
p resolves to, as if by POSIX mkdir() with a second argument of static_cast<int>(perms::all).
Creation failure because p resolves to an existing directory shall not be treated as an error.