From Jason Turner

[fs.op.rename]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpubx0nxb3/{from.md → to.md} +26 -0
tmp/tmpubx0nxb3/{from.md → to.md} RENAMED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 may 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 may 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*]
24
+
25
+ *Throws:* As specified in  [[fs.err.report]].
26
+