tmp/tmp5zuul0u7/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Absolute <a id="fs.op.absolute">[[fs.op.absolute]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
path absolute(const path& p);
|
| 5 |
+
path absolute(const path& p, error_code& ec);
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Effects:* Composes an absolute path referencing the same file system
|
| 9 |
+
location as `p` according to the operating system ([[fs.conform.os]]).
|
| 10 |
+
|
| 11 |
+
*Returns:* The composed path. The signature with argument `ec` returns
|
| 12 |
+
`path()` if an error occurs.
|
| 13 |
+
|
| 14 |
+
[*Note 1*: For the returned path, `rp`, `rp.is_absolute()` is `true`
|
| 15 |
+
unless an error occurs. — *end note*]
|
| 16 |
+
|
| 17 |
+
*Throws:* As specified in [[fs.err.report]].
|
| 18 |
+
|
| 19 |
+
[*Note 2*: To resolve symlinks, or perform other sanitization which
|
| 20 |
+
might require queries to secondary storage, such as hard disks, consider
|
| 21 |
+
`canonical` ([[fs.op.canonical]]). — *end note*]
|
| 22 |
+
|
| 23 |
+
[*Note 3*: Implementations are strongly encouraged to not query
|
| 24 |
+
secondary storage, and not consider `!exists(p)` an
|
| 25 |
+
error. — *end note*]
|
| 26 |
+
|
| 27 |
+
[*Example 1*: For POSIX-based operating systems, `absolute(p)` is
|
| 28 |
+
simply `current_path()/p`. For Windows-based operating systems,
|
| 29 |
+
`absolute` might have the same semantics as
|
| 30 |
+
`GetFullPathNameW`. — *end example*]
|
| 31 |
+
|