From b2242cb526181a75f8e91f91121cb62d1d6937fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 24 Dec 2019 15:53:21 +0100 Subject: [PATCH] Finished editing path --- README.md | 8 ++++---- index.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa4ab2e..788573d 100644 --- a/README.md +++ b/README.md @@ -1626,13 +1626,13 @@ from pathlib import Path ``` ```python - = str() # Returns Path as a string. - = open() # Opens the file and returns a file object. + = .iterdir() # Returns dir contents as Path objects. + = .glob('') # Returns Paths matching the wildcard pattern. ``` ```python - = .iterdir() # Returns dir contents as Path objects. - = .glob('') # Returns Paths matching the wildcard pattern. + = str() # Returns path as a string. + = open() # Opens the file and returns a file object. ``` diff --git a/index.html b/index.html index 4252204..53d6d66 100644 --- a/index.html +++ b/index.html @@ -1486,12 +1486,12 @@ value = args.<name> <str> = <Path>.suffix # Returns final component's extension. <tup.> = <Path>.parts # Returns all components as strings. -
<str>  = str(<Path>)                # Returns Path as a string.
-<file> = open(<Path>)               # Opens the file and returns a file object.
-
<iter> = <Path>.iterdir()           # Returns dir contents as Path objects.
 <iter> = <Path>.glob('<pattern>')   # Returns Paths matching the wildcard pattern.
 
+
<str>  = str(<Path>)                # Returns path as a string.
+<file> = open(<Path>)               # Opens the file and returns a file object.
+

#OS Commands

Files and Directories

  • Paths can be either strings, Paths, or DirEntry objects.
  • Functions report OS related errors by raising either OSError or one of its subclasses.