Path.is_dir() Return True if the path points to a directory (or a symbolic link pointing to a directory), False
class pathlib.WindowsPath(*pathsegments) A subclass of Path and PureWindowsPath, this class represents
tempfile.SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None) This
Path.write_bytes(data) Open the file pointed to in bytes mode, write data to it, and close the file:
os.path.getsize(path) Return the size, in bytes, of path. Raise
os.path.splitext(path) Split the pathname path into a pair (root, ext) such that root + ext == path
PurePath.is_reserved() With PureWindowsPath, return True if the path is considered reserved under
os.path.join(path, *paths) Join one or more path components intelligently. The return value is the concatenation of path
os.path.realpath(path) Return the canonical path of the specified filename, eliminating any symbolic links encountered in the
os.path.sameopenfile(fp1, fp2) Return True if the file descriptors fp1 and fp2 refer to the same
Page 4 of 19