From 159e2d460201d8efd5e7962641e0be960a273270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 23 Dec 2019 19:06:22 +0100 Subject: [PATCH] Working on path --- README.md | 10 +++++----- index.html | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a647556..0555285 100644 --- a/README.md +++ b/README.md @@ -1593,14 +1593,14 @@ from pathlib import Path ``` ```python - = Path() # Or: Path('.') - = Path.cwd() # Returns the absolute cwd. - = .resolve() # Returns the absolute Path without symlinks. - = .parent # Returns Path without final component. + = Path() # Returns relative cwd. Also Path('.'). + = Path.cwd() # Returns absolute cwd. Also Path().resolve(). + = .resolve() # Returns absolute Path without symlinks. ``` ```python - = .name # Returns final component. + = .parent # Returns Path without final component. + = .name # Returns final component as string. = .stem # Returns final component without extension. = .suffix # Returns final component's extension. = .parts # Returns all components as strings. diff --git a/index.html b/index.html index 3f4cfb9..1775451 100644 --- a/index.html +++ b/index.html @@ -1464,12 +1464,12 @@ value = args.<name>
<Path> = Path(<path> [, ...])       # Accepts strings, Paths and DirEntry objects.
 <Path> = <path> / <path> [/ ...]    # One of the paths must be a Path object.
 
-
<Path> = Path()                     # Or: Path('.')
-<Path> = Path.cwd()                 # Returns the absolute cwd.
-<Path> = <Path>.resolve()           # Returns the absolute Path without symlinks.
-<Path> = <Path>.parent              # Returns Path without final component.
+
<Path> = Path()                     # Returns relative cwd. Also Path('.').
+<Path> = Path.cwd()                 # Returns absolute cwd. Also Path().resolve().
+<Path> = <Path>.resolve()           # Returns absolute Path without symlinks.
 
-
<str>  = <Path>.name                # Returns final component.
+
<Path> = <Path>.parent              # Returns Path without final component.
+<str>  = <Path>.name                # Returns final component as string.
 <str>  = <Path>.stem                # Returns final component without extension.
 <str>  = <Path>.suffix              # Returns final component's extension.
 <tup.> = <Path>.parts               # Returns all components as strings.