stat.S_ISDIR(mode) Return non-zero if the mode is from a directory.
stat.S_ISREG(mode) Return non-zero if the mode is from a regular file.
fileinput.hook_compressed(filename, mode) Transparently opens files compressed with gzip and bzip2 (recognized by the extensions
stat.S_ISSOCK(mode) Return non-zero if the mode is from a socket.
fileinput.hook_encoded(encoding) Returns a hook which opens each file with
PurePath.joinpath(*other) Calling this method is equivalent to combining the path with each of the other arguments
Path.write_bytes(data) Open the file pointed to in bytes mode, write data to it, and close the file:
PurePath.parents An immutable sequence providing access to the logical ancestors of the path:
shutil.copyfileobj(fsrc, fdst[, length]) Copy the contents of the file-like object fsrc to the file-like object fdst
tempfile.gettempprefix() Return the filename prefix used to create temporary files. This does not contain the directory component
Page 2 of 19