fnmatch.fnmatch(filename, pattern) Test whether the filename string matches the pattern string, returning
filecmp.clear_cache() Clear the filecmp cache. This may be useful if a file is compared so quickly after it is modified that
PurePath.with_suffix(suffix) Return a new path with the suffix changed. If the original path doesn’t have a suffix
report_full_closure() Print a comparison between a and b and common subdirectories (recursively).
filecmp.cmp(f1, f2, shallow=True) Compare the files named f1 and f2, returning True if they seem
The modules described in this chapter deal with disk files and directories. For example, there are modules for reading the properties of files, manipulating paths in a portable
Source code: Lib/macpath.py
os.path.ismount(path) Return True if pathname path is a mount point: a point in a
Path.owner() Return the name of the user owning the file.
os.path.expanduser(path) On Unix and Windows, return the argument with an initial component of ~ or ~user
Page 8 of 19