From ae3d9c7ec4365c4a90947e406d6f2e15dfeca8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 18 Feb 2019 15:43:53 +0100 Subject: [PATCH] Pathlib --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ad916cc..998c8b1 100644 --- a/README.md +++ b/README.md @@ -964,18 +964,22 @@ Pathlib ```python from pathlib import Path -pwd = Path() - = Path('' [, '', , ...]) - = / '' / '' +pwd = Path() + = Path('' [, '', , ...]) + = / '' / '' ``` ```python - = .iterdir() # Returns all files in a dir. - = .glob('') # Returns all matches. - = .resolve() # Makes path absolute. = .exists() + = .is_file() = .is_dir() - = .open() + = .iterdir() +``` + +```python + = .glob('') # Returns all matches. + = .resolve() # Makes path absolute. + = .open() # Opens file. ``` ```python