Skip to content

Commit a2448a2

Browse files
committed
DirEntry
1 parent afafda3 commit a2448a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1622,13 +1622,13 @@ os.mkdir(<path>, mode=0o777) # Creates a directory.
16221622
```python
16231623
<str> = <DirEntry>.name # Final component of the path.
16241624
<str> = <DirEntry>.path # Path with final component.
1625+
<Path> = Path(<DirEntry>) # Path as Path object.
16251626
```
16261627

16271628
```python
16281629
<bool> = <DirEntry>.is_file()
16291630
<bool> = <DirEntry>.is_dir()
16301631
<bool> = <DirEntry>.is_symlink()
1631-
<Path> = Path(<DirEntry>)
16321632
```
16331633

16341634
### Shell Commands

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1454,11 +1454,11 @@ <h3 id="filesanddirectoriescommands">Files and Directories Commands</h3>
14541454
<h4 id="direntry">DirEntry:</h4>
14551455
<pre><code class="python language-python hljs">&lt;str&gt; = &lt;DirEntry&gt;.name <span class="hljs-comment"># Final component of the path.</span>
14561456
&lt;str&gt; = &lt;DirEntry&gt;.path <span class="hljs-comment"># Path with final component.</span>
1457+
&lt;Path&gt; = Path(&lt;DirEntry&gt;) <span class="hljs-comment"># Path as Path object.</span>
14571458
</code></pre>
14581459
<pre><code class="python language-python hljs">&lt;bool&gt; = &lt;DirEntry&gt;.is_file()
14591460
&lt;bool&gt; = &lt;DirEntry&gt;.is_dir()
14601461
&lt;bool&gt; = &lt;DirEntry&gt;.is_symlink()
1461-
&lt;Path&gt; = Path(&lt;DirEntry&gt;)
14621462
</code></pre>
14631463
<h3 id="shellcommands">Shell Commands</h3>
14641464
<pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> os

0 commit comments

Comments
 (0)