File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1641,6 +1641,7 @@ from pathlib import Path
16411641< Path> = Path() # Returns relative cwd. Also Path('.').
16421642< Path> = Path.cwd() # Returns absolute cwd. Also Path().resolve().
16431643< Path> = < Path> .resolve() # Returns absolute Path without symlinks.
1644+ < Path> = Path.home() # Returns user's home directory.
16441645```
16451646
16461647``` python
Original file line number Diff line number Diff line change 15191519< pre > < code class ="python language-python hljs "> <Path> = Path() < span class ="hljs-comment "> # Returns relative cwd. Also Path('.').</ span >
15201520<Path> = Path.cwd() < span class ="hljs-comment "> # Returns absolute cwd. Also Path().resolve().</ span >
15211521<Path> = <Path>.resolve() < span class ="hljs-comment "> # Returns absolute Path without symlinks.</ span >
1522+ <Path> = Path.home() < span class ="hljs-comment "> # Returns user's home directory.</ span >
15221523</ code > </ pre >
15231524< pre > < code class ="python language-python hljs "> <Path> = <Path>.parent < span class ="hljs-comment "> # Returns Path without final component.</ span >
15241525<str> = <Path>.name < span class ="hljs-comment "> # Returns final component as a string.</ span >
You can’t perform that action at this time.
0 commit comments