Skip to content

Commit 9be92b8

Browse files
authored
Merge 2019-02 LWG Motion 12
P1164R1 Make create_directory() Intuitive Fixes #2703.
2 parents c2dac40 + a911187 commit 9be92b8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/iostreams.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -14742,8 +14742,6 @@
1474214742
\returns \tcode{true} if a new directory was created
1474314743
for the directory \tcode{p} resolves to,
1474414744
otherwise \tcode{false}.
14745-
The signature with argument \tcode{ec}
14746-
returns \tcode{false} if an error occurs.
1474714745

1474814746
\pnum
1474914747
\throws As specified in~\ref{fs.err.report}.
@@ -14765,13 +14763,13 @@
1476514763
\begin{itemdescr}
1476614764
\pnum
1476714765
\effects Creates the directory \tcode{p} resolves to,
14768-
as if by POSIX \tcode{mkdir()} with a second argument of
14766+
as if by POSIX \tcode{mkdir} with a second argument of
1476914767
\tcode{static_cast<int>(perms::all)}.
14770-
Creation failure because \tcode{p} already exists is not an error.
14768+
If \tcode{mkdir} fails because \tcode{p} resolves to an existing directory,
14769+
no error is reported. Otherwise on failure an error is reported.
1477114770

1477214771
\pnum
1477314772
\returns \tcode{true} if a new directory was created, otherwise \tcode{false}.
14774-
The signature with argument \tcode{ec} returns \tcode{false} if an error occurs.
1477514773

1477614774
\pnum
1477714775
\throws As specified in~\ref{fs.err.report}.
@@ -14789,7 +14787,8 @@
1478914787
directory \tcode{p} resolves to, with
1479014788
attributes copied from directory \tcode{existing_p}. The set of attributes
1479114789
copied is operating system dependent.
14792-
Creation failure because \tcode{p} already exists is not an error.
14790+
If \tcode{mkdir} fails because \tcode{p} resolves to an existing directory,
14791+
no error is reported. Otherwise on failure an error is reported.
1479314792
\begin{note} For POSIX-based operating systems, the
1479414793
attributes are those copied by native API \tcode{stat(existing_p.c_str(), \&attributes_stat)}
1479514794
followed by \tcode{mkdir(p.c_str(), attributes_stat.st_mode)}. For
@@ -14798,8 +14797,9 @@
1479814797
\end{note}
1479914798

1480014799
\pnum
14801-
\returns \tcode{true} if a new directory was created, otherwise \tcode{false}.
14802-
The signature with argument \tcode{ec} returns \tcode{false} if an error occurs.
14800+
\returns \tcode{true} if a new directory was created
14801+
with attributes copied from directory \tcode{existing_p},
14802+
otherwise \tcode{false}.
1480314803

1480414804
\pnum
1480514805
\throws As specified in~\ref{fs.err.report}.

0 commit comments

Comments
 (0)