27 Input/output library [input.output]

27.10 File systems [filesystems]

27.10.15 Filesystem operation functions [fs.op.funcs]

27.10.15.6 Create directories [fs.op.create_directories]

bool create_directories(const path& p); bool create_directories(const path& p, error_code& ec) noexcept;

Effects: Establishes the postcondition by calling create_directory() for any element of p that does not exist.

Postconditions: is_directory(p).

Returns: true if a new directory was created, otherwise false. The signature with argument ec returns false if an error occurs.

Throws: As specified in [fs.err.report].

Complexity: Ο(n) where n is the number of elements of p that do not exist.