File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1610,12 +1610,13 @@ os.mkdir(<path>, mode=0o777) # Creates a directory.
1610
1610
```
1611
1611
1612
1612
#### DirEntry:
1613
- ``` pyton
1614
- <str> = <DirEntry>.name
1615
- <str> = <DirEntry>.path
1613
+ ``` python
1614
+ < str > = < DirEntry> .name # Final component of the path.
1615
+ < str > = < DirEntry> .path # Path with final component.
1616
1616
< bool > = < DirEntry> .is_file()
1617
1617
< bool > = < DirEntry> .is_dir()
1618
- <bool> = <DirEntry>.is_symlink()
1618
+ < bool > = < DirEntry> .is_symlink()
1619
+ < Path> = Path(< DirEntry> )
1619
1620
```
1620
1621
1621
1622
### Shell Commands
Original file line number Diff line number Diff line change @@ -1445,11 +1445,12 @@ <h3 id="filesanddirectoriescommands">Files and Directories Commands</h3>
1445
1445
<iter> = os.scandir(path=< span class ="hljs-string "> '.'</ span > ) < span class ="hljs-comment "> # Returns os.DirEntry objects located at path.</ span >
1446
1446
</ code > </ pre >
1447
1447
< h4 id ="direntry "> DirEntry:</ h4 >
1448
- < pre > < code class ="pyton language-pyton python "> <str> = <DirEntry>.name
1449
- <str> = <DirEntry>.path
1448
+ < pre > < code class ="python language-python hljs "> <str> = <DirEntry>.name < span class =" hljs-comment " > # Final component of the path. </ span >
1449
+ <str> = <DirEntry>.path < span class =" hljs-comment " > # Path with final component. </ span >
1450
1450
<bool> = <DirEntry>.is_file()
1451
1451
<bool> = <DirEntry>.is_dir()
1452
- <bool> = <DirEntry>.is_symlink()
1452
+ <bool> = <DirEntry>.is_symlink()
1453
+ <Path> = Path(<DirEntry>)
1453
1454
</ code > </ pre >
1454
1455
< h3 id ="shellcommands "> Shell Commands</ h3 >
1455
1456
< pre > < code class ="python language-python hljs "> < span class ="hljs-keyword "> import</ span > os
You can’t perform that action at this time.
0 commit comments