You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shutil.rmtree(<path>) <spanclass="hljs-comment"># Deletes the entire directory tree.</span>
1446
1446
</code></pre>
1447
-
<pre><codeclass="python language-python hljs">os.rename(<spanclass="hljs-keyword">from</span>, to) <spanclass="hljs-comment"># Renames the file or directory.</span>
1448
-
os.replace(<spanclass="hljs-keyword">from</span>, to) <spanclass="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
1447
+
<pre><codeclass="python language-python hljs">os.rename(<spanclass="hljs-keyword">from</span>, to) <spanclass="hljs-comment"># Renames the file or directory.</span>
1448
+
os.replace(<spanclass="hljs-keyword">from</span>, to) <spanclass="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
1449
1449
</code></pre>
1450
-
<pre><codeclass="python language-python hljs">os.mkdir(<path>, mode=<spanclass="hljs-number">0o777</span>) <spanclass="hljs-comment"># Creates a directory.</span>
1451
-
<iter> = os.scandir(path=<spanclass="hljs-string">'.'</span>) <spanclass="hljs-comment"># Returns os.DirEntry objects located at path.</span>
1450
+
<pre><codeclass="python language-python hljs">os.mkdir(<path>, mode=<spanclass="hljs-number">0o777</span>) <spanclass="hljs-comment"># Creates a directory.</span>
1451
+
<iter> = os.scandir(path=<spanclass="hljs-string">'.'</span>) <spanclass="hljs-comment"># Returns os.DirEntry objects located at path.</span>
1452
1452
</code></pre>
1453
1453
<h4id="direntry">DirEntry:</h4>
1454
-
<pre><codeclass="python language-python hljs"><str> = <DirEntry>.name <spanclass="hljs-comment"># Final component of the path.</span>
1455
-
<str> = <DirEntry>.path <spanclass="hljs-comment"># Path with final component.</span>
0 commit comments