tmp/tmp8edktdsc/{from.md → to.md}
RENAMED
|
@@ -4,37 +4,33 @@
|
|
| 4 |
path filesystem::current_path();
|
| 5 |
path filesystem::current_path(error_code& ec);
|
| 6 |
```
|
| 7 |
|
| 8 |
*Returns:* The absolute path of the current working directory, whose
|
| 9 |
-
pathname in the native format is obtained as if by POSIX `getcwd
|
| 10 |
signature with argument `ec` returns `path()` if an error occurs.
|
| 11 |
|
| 12 |
*Throws:* As specified in [[fs.err.report]].
|
| 13 |
|
| 14 |
*Remarks:* The current working directory is the directory, associated
|
| 15 |
with the process, that is used as the starting location in pathname
|
| 16 |
resolution for relative paths.
|
| 17 |
|
| 18 |
-
[*Note 1*: The
|
| 19 |
-
returned value is a path, not just a single directory
|
| 20 |
-
name. — *end note*]
|
| 21 |
-
|
| 22 |
-
[*Note 2*: The current path as returned by many operating systems is a
|
| 23 |
dangerous global variable and can be changed unexpectedly by third-party
|
| 24 |
or system library functions, or by another thread. — *end note*]
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
void filesystem::current_path(const path& p);
|
| 28 |
void filesystem::current_path(const path& p, error_code& ec) noexcept;
|
| 29 |
```
|
| 30 |
|
| 31 |
-
*Effects:* Establishes the postcondition, as if by POSIX `chdir
|
| 32 |
|
| 33 |
*Ensures:* `equivalent(p, current_path())`.
|
| 34 |
|
| 35 |
*Throws:* As specified in [[fs.err.report]].
|
| 36 |
|
| 37 |
-
[*Note
|
| 38 |
global state and can be changed unexpectedly by third-party or system
|
| 39 |
library functions, or by another thread. — *end note*]
|
| 40 |
|
|
|
|
| 4 |
path filesystem::current_path();
|
| 5 |
path filesystem::current_path(error_code& ec);
|
| 6 |
```
|
| 7 |
|
| 8 |
*Returns:* The absolute path of the current working directory, whose
|
| 9 |
+
pathname in the native format is obtained as if by POSIX `getcwd`. The
|
| 10 |
signature with argument `ec` returns `path()` if an error occurs.
|
| 11 |
|
| 12 |
*Throws:* As specified in [[fs.err.report]].
|
| 13 |
|
| 14 |
*Remarks:* The current working directory is the directory, associated
|
| 15 |
with the process, that is used as the starting location in pathname
|
| 16 |
resolution for relative paths.
|
| 17 |
|
| 18 |
+
[*Note 1*: The current path as returned by many operating systems is a
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
dangerous global variable and can be changed unexpectedly by third-party
|
| 20 |
or system library functions, or by another thread. — *end note*]
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
void filesystem::current_path(const path& p);
|
| 24 |
void filesystem::current_path(const path& p, error_code& ec) noexcept;
|
| 25 |
```
|
| 26 |
|
| 27 |
+
*Effects:* Establishes the postcondition, as if by POSIX `chdir`.
|
| 28 |
|
| 29 |
*Ensures:* `equivalent(p, current_path())`.
|
| 30 |
|
| 31 |
*Throws:* As specified in [[fs.err.report]].
|
| 32 |
|
| 33 |
+
[*Note 2*: The current path for many operating systems is a dangerous
|
| 34 |
global state and can be changed unexpectedly by third-party or system
|
| 35 |
library functions, or by another thread. — *end note*]
|
| 36 |
|