tmp/tmp_glmi468/{from.md → to.md}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
#### Rename <a id="fs.op.rename">[[fs.op.rename]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
void rename(const path& old_p, const path& new_p);
|
| 5 |
-
void rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
|
| 6 |
```
|
| 7 |
|
| 8 |
*Effects:* Renames `old_p` to `new_p`, as if by POSIX `rename()`.
|
| 9 |
|
| 10 |
[*Note 1*:
|
| 11 |
|
| 12 |
- If `old_p` and `new_p` resolve to the same existing file, no action is
|
| 13 |
taken.
|
| 14 |
-
- Otherwise, the rename
|
| 15 |
- if `new_p` resolves to an existing non-directory file, `new_p` is
|
| 16 |
removed; otherwise,
|
| 17 |
- if `new_p` resolves to an existing directory, `new_p` is removed if
|
| 18 |
-
empty on POSIX compliant operating systems but
|
| 19 |
other operating systems.
|
| 20 |
|
| 21 |
A symbolic link is itself renamed, rather than the file it resolves to.
|
| 22 |
|
| 23 |
— *end note*]
|
|
|
|
| 1 |
#### Rename <a id="fs.op.rename">[[fs.op.rename]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
void filesystem::rename(const path& old_p, const path& new_p);
|
| 5 |
+
void filesystem::rename(const path& old_p, const path& new_p, error_code& ec) noexcept;
|
| 6 |
```
|
| 7 |
|
| 8 |
*Effects:* Renames `old_p` to `new_p`, as if by POSIX `rename()`.
|
| 9 |
|
| 10 |
[*Note 1*:
|
| 11 |
|
| 12 |
- If `old_p` and `new_p` resolve to the same existing file, no action is
|
| 13 |
taken.
|
| 14 |
+
- Otherwise, the rename can include the following effects:
|
| 15 |
- if `new_p` resolves to an existing non-directory file, `new_p` is
|
| 16 |
removed; otherwise,
|
| 17 |
- if `new_p` resolves to an existing directory, `new_p` is removed if
|
| 18 |
+
empty on POSIX compliant operating systems but might be an error on
|
| 19 |
other operating systems.
|
| 20 |
|
| 21 |
A symbolic link is itself renamed, rather than the file it resolves to.
|
| 22 |
|
| 23 |
— *end note*]
|