Browse Source

Pathlib

pull/27/head
Jure Šorn 5 years ago
parent
commit
f6e72dda70
1 changed files with 6 additions and 4 deletions
  1. 10
      README.md

10
README.md

@ -977,18 +977,20 @@ pwd = Path()
``` ```
```python ```python
<iter> = <Path>.glob('<pattern>') # Returns all matches.
<file> = <Path>.open() # Opens file.
<Path> = <Path>.resolve() # Makes path absolute.
<iter> = <Path>.glob('<pattern>') # Returns all matches.
``` ```
```python ```python
<Path> = <Path>.resolve() # Makes path absolute.
<str> = str(<Path>) # Returns path as string. <str> = str(<Path>) # Returns path as string.
<tup.> = <Path>.parts # Returns all components as strings.
```
```python
<str> = <Path>.name # Final component. <str> = <Path>.name # Final component.
<str> = <Path>.stem # Final component without extension. <str> = <Path>.stem # Final component without extension.
<str> = <Path>.suffix # Final component's extension. <str> = <Path>.suffix # Final component's extension.
<Path> = <Path>.parent # Path without final component. <Path> = <Path>.parent # Path without final component.
<tup.> = <Path>.parts # All components as strings.
``` ```

Loading…
Cancel
Save