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.
16101610```
16111611
16121612#### 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.
16161616< bool > = < DirEntry> .is_file()
16171617< bool > = < DirEntry> .is_dir()
1618- <bool> = <DirEntry>.is_symlink()
1618+ < bool > = < DirEntry> .is_symlink()
1619+ < Path> = Path(< DirEntry> )
16191620```
16201621
16211622### Shell Commands
Original file line number Diff line number Diff line change @@ -1445,11 +1445,12 @@ <h3 id="filesanddirectoriescommands">Files and Directories Commands</h3>
14451445<iter> = os.scandir(path=< span class ="hljs-string "> '.'</ span > ) < span class ="hljs-comment "> # Returns os.DirEntry objects located at path.</ span >
14461446</ code > </ pre >
14471447< 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 >
14501450<bool> = <DirEntry>.is_file()
14511451<bool> = <DirEntry>.is_dir()
1452- <bool> = <DirEntry>.is_symlink()
1452+ <bool> = <DirEntry>.is_symlink()
1453+ <Path> = Path(<DirEntry>)
14531454</ code > </ pre >
14541455< h3 id ="shellcommands "> Shell Commands</ h3 >
14551456< 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