|
|
@ -1525,7 +1525,7 @@ os.mkdir(<path>, mode=<span class="hljs-number">0o777</span>) <span |
|
|
|
<pre><code class="python language-python hljs">shutil.copy(from, to) <span class="hljs-comment"># Copies the file.</span> |
|
|
|
shutil.copytree(from, to) <span class="hljs-comment"># Copies the directory.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs">os.rename(from, to) <span class="hljs-comment"># Renames the file or directory.</span> |
|
|
|
<pre><code class="python language-python hljs">os.rename(from, to) <span class="hljs-comment"># Renames or moves the file or directory.</span> |
|
|
|
os.replace(from, to) <span class="hljs-comment"># Same, but overwrites 'to' if it exists.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs">os.remove(<path>) <span class="hljs-comment"># Deletes the file.</span> |
|
|
|