File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1679,7 +1679,7 @@ shutil.copytree(from, to) # Copies the directory.
1679
1679
```
1680
1680
1681
1681
``` python
1682
- os.rename(from , to) # Renames the file or directory.
1682
+ os.rename(from , to) # Renames or moves the file or directory.
1683
1683
os.replace(from , to) # Same, but overwrites 'to' if it exists.
1684
1684
```
1685
1685
Original file line number Diff line number Diff line change 1525
1525
< pre > < code class ="python language-python hljs "> shutil.copy(from, to) < span class ="hljs-comment "> # Copies the file.</ span >
1526
1526
shutil.copytree(from, to) < span class ="hljs-comment "> # Copies the directory.</ span >
1527
1527
</ code > </ pre >
1528
- < pre > < code class ="python language-python hljs "> os.rename(from, to) < span class ="hljs-comment "> # Renames the file or directory.</ span >
1528
+ < pre > < code class ="python language-python hljs "> os.rename(from, to) < span class ="hljs-comment "> # Renames or moves the file or directory.</ span >
1529
1529
os.replace(from, to) < span class ="hljs-comment "> # Same, but overwrites 'to' if it exists.</ span >
1530
1530
</ code > </ pre >
1531
1531
< pre > < code class ="python language-python hljs "> os.remove(<path>) < span class ="hljs-comment "> # Deletes the file.</ span >
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const TOC =
34
34
'</code></pre>\n' ;
35
35
36
36
const OS_RENAME =
37
- 'os.rename(from, to) <span class="hljs-comment"># Renames the file or directory.</span>\n' +
37
+ 'os.rename(from, to) <span class="hljs-comment"># Renames or moves the file or directory.</span>\n' +
38
38
'os.replace(from, to) <span class="hljs-comment"># Same, but overwrites \'to\' if it exists.</span>\n' ;
39
39
40
40
const SHUTIL_COPY =
You can’t perform that action at this time.
0 commit comments