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.