Back to module index
Go to module by name
genericpath
Path operations common to more than one OS
Do not use directly. The OS specific modules import the appropriate
functions from this module themselves.
Functions
commonprefix
commonprefix(m)
Given a list of pathnames, returns the longest common leading component
exists
exists(path)
Test whether a path exists. Returns False for broken symbolic links
getatime
getatime(filename)
Return the last access time of a file, reported by os.stat().
getctime
getctime(filename)
Return the metadata change time of a file, reported by os.stat().
getmtime
getmtime(filename)
Return the last modification time of a file, reported by os.stat().
getsize
getsize(filename)
Return the size of a file, reported by os.stat().
isdir
isdir(s)
Return true if the pathname refers to an existing directory.
isfile
isfile(path)
Test whether a path is a regular file
samefile
samefile(f1, f2)
Test whether two pathnames reference the same actual file or directory
This is determined by the device number and i-node number and
raises an exception if an os.stat() call on either pathname fails.
sameopenfile
sameopenfile(fp1, fp2)
Test whether two open file objects reference the same file
samestat
samestat(s1, s2)
Test whether two stat buffers reference the same file
Modules
os
stat