tmp/tmpwp_be0vr/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Current path <a id="fs.op.current.path">[[fs.op.current.path]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
path current_path();
|
| 5 |
+
path 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()` name was chosen to emphasize that 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. It may be changed unexpectedly by third-party
|
| 24 |
+
or system library functions, or by another thread. — *end note*]
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
void current_path(const path& p);
|
| 28 |
+
void 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 3*: The current path for many operating systems is a dangerous
|
| 38 |
+
global state. It may be changed unexpectedly by a third-party or system
|
| 39 |
+
library functions, or by another thread. — *end note*]
|
| 40 |
+
|