Differences between revisions 2 and 7 (spanning 5 versions)
Revision 2 as of 2023-03-01 15:27:28
Size: 1365
Comment:
Revision 7 as of 2023-06-15 18:37:50
Size: 1974
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''`os.path`''' is a module providing filesystem APIs.
Line 9: Line 11:
== AbsPath == == Usage ==

=
== AbsPath ===
Line 17: Line 21:
== BaseName == === BaseName ===
Line 25: Line 29:
== DirName == === CommonPath ===

----



=== CommonPrefix ===

----



=== DirName ===
Line 33: Line 49:
== Exists == === Exists ===
Line 41: Line 57:
== ExpandUser == === ExpandUser ===
Line 49: Line 65:
== IsAbs == === ExpandVars ===

----



=== GetATime ===

----



=== GetCTime ===

----



=== GetMTime ===

----



=== GetSize ===

----



=== IsAbs ===
Line 57: Line 103:
== IsDir == === IsDir ===
Line 65: Line 111:
== IsFile == === IsFile ===
Line 73: Line 119:
== IsLink == === IsLink ===
Line 81: Line 127:
== Join == === Join ===
Line 89: Line 135:
== RealPath == === NormCase ===

----



=== NormPath ===

----



=== RealPath ===
Line 97: Line 155:
== RelPath == === RelPath ===
Line 105: Line 163:
== SameFile == === SameFile ===
Line 113: Line 171:
== SplitExt == === SameOpenFile ===

----



=== SameStat ===

----



=== Split ===

----



=== SplitDrive ===

----



=== SplitExt ===
Line 125: Line 207:
[[https://pymotw.com/3/os.path/|Python Module of the Day article for os.path]]

Python Os Path

os.path is a module providing filesystem APIs.


Usage

AbsPath

See Path.absolute.


BaseName

See Path.name.


CommonPath


CommonPrefix


DirName

See Path.parent.


Exists

See Path.exists.


ExpandUser

See Path.expanduser and Path.home.


ExpandVars


GetATime


GetCTime


GetMTime


GetSize


IsAbs

See Path.is_absolute.


IsDir

See Path.is_dir.


IsFile

See Path.is_file.


See Path.is_symlink.


Join

See Path.joinpath.


NormCase


NormPath


RealPath

See Path.resolve.


RelPath

See Path.relative_to.


SameFile

See Path.samefile.


SameOpenFile


SameStat


Split


SplitDrive


SplitExt

See Path.stem and Path.suffix.


See also

Python os.path module documentation

Python Module of the Day article for os.path


CategoryRicottone

Python/Os/Path (last edited 2023-10-11 19:43:17 by DominicRicottone)