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.
16791679```
16801680
16811681``` python
1682- os.rename(from , to) # Renames the file or directory.
1682+ os.rename(from , to) # Renames or moves the file or directory.
16831683os.replace(from , to) # Same, but overwrites 'to' if it exists.
16841684```
16851685
Original file line number Diff line number Diff line change 15251525< pre > < code class ="python language-python hljs "> shutil.copy(from, to) < span class ="hljs-comment "> # Copies the file.</ span >
15261526shutil.copytree(from, to) < span class ="hljs-comment "> # Copies the directory.</ span >
15271527</ 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 >
15291529os.replace(from, to) < span class ="hljs-comment "> # Same, but overwrites 'to' if it exists.</ span >
15301530</ code > </ pre >
15311531< 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 =
3434 '</code></pre>\n' ;
3535
3636const 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' +
3838 'os.replace(from, to) <span class="hljs-comment"># Same, but overwrites \'to\' if it exists.</span>\n' ;
3939
4040const SHUTIL_COPY =
You can’t perform that action at this time.
0 commit comments