Skip to content

Commit 159e2d4

Browse files
committed
Working on path
1 parent 2044635 commit 159e2d4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,14 +1593,14 @@ from pathlib import Path
15931593
```
15941594

15951595
```python
1596-
<Path> = Path() # Or: Path('.')
1597-
<Path> = Path.cwd() # Returns the absolute cwd.
1598-
<Path> = <Path>.resolve() # Returns the absolute Path without symlinks.
1599-
<Path> = <Path>.parent # Returns Path without final component.
1596+
<Path> = Path() # Returns relative cwd. Also Path('.').
1597+
<Path> = Path.cwd() # Returns absolute cwd. Also Path().resolve().
1598+
<Path> = <Path>.resolve() # Returns absolute Path without symlinks.
16001599
```
16011600

16021601
```python
1603-
<str> = <Path>.name # Returns final component.
1602+
<Path> = <Path>.parent # Returns Path without final component.
1603+
<str> = <Path>.name # Returns final component as string.
16041604
<str> = <Path>.stem # Returns final component without extension.
16051605
<str> = <Path>.suffix # Returns final component's extension.
16061606
<tup.> = <Path>.parts # Returns all components as strings.

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,12 +1464,12 @@
14641464
<pre><code class="python language-python hljs">&lt;Path&gt; = Path(&lt;path&gt; [, ...]) <span class="hljs-comment"># Accepts strings, Paths and DirEntry objects.</span>
14651465
&lt;Path&gt; = &lt;path&gt; / &lt;path&gt; [/ ...] <span class="hljs-comment"># One of the paths must be a Path object.</span>
14661466
</code></pre>
1467-
<pre><code class="python language-python hljs">&lt;Path&gt; = Path() <span class="hljs-comment"># Or: Path('.')</span>
1468-
&lt;Path&gt; = Path.cwd() <span class="hljs-comment"># Returns the absolute cwd.</span>
1469-
&lt;Path&gt; = &lt;Path&gt;.resolve() <span class="hljs-comment"># Returns the absolute Path without symlinks.</span>
1470-
&lt;Path&gt; = &lt;Path&gt;.parent <span class="hljs-comment"># Returns Path without final component.</span>
1467+
<pre><code class="python language-python hljs">&lt;Path&gt; = Path() <span class="hljs-comment"># Returns relative cwd. Also Path('.').</span>
1468+
&lt;Path&gt; = Path.cwd() <span class="hljs-comment"># Returns absolute cwd. Also Path().resolve().</span>
1469+
&lt;Path&gt; = &lt;Path&gt;.resolve() <span class="hljs-comment"># Returns absolute Path without symlinks.</span>
14711470
</code></pre>
1472-
<pre><code class="python language-python hljs">&lt;str&gt; = &lt;Path&gt;.name <span class="hljs-comment"># Returns final component.</span>
1471+
<pre><code class="python language-python hljs">&lt;Path&gt; = &lt;Path&gt;.parent <span class="hljs-comment"># Returns Path without final component.</span>
1472+
&lt;str&gt; = &lt;Path&gt;.name <span class="hljs-comment"># Returns final component as string.</span>
14731473
&lt;str&gt; = &lt;Path&gt;.stem <span class="hljs-comment"># Returns final component without extension.</span>
14741474
&lt;str&gt; = &lt;Path&gt;.suffix <span class="hljs-comment"># Returns final component's extension.</span>
14751475
&lt;tup.&gt; = &lt;Path&gt;.parts <span class="hljs-comment"># Returns all components as strings.</span>

0 commit comments

Comments
 (0)