pathlib.Path.touch()
  • References/Python/Python/File & Directory Access

Path.touch(mode=0o666, exist_ok=True) Create a file at this given path. If mode is given, it is combined with the process’

2025-01-10 15:47:30
pathlib.Path.glob()
  • References/Python/Python/File & Directory Access

Path.glob(pattern) Glob the given pattern in the directory represented by this path, yielding all matching files (of

2025-01-10 15:47:30
tempfile.TemporaryDirectory()
  • References/Python/Python/File & Directory Access

tempfile.TemporaryDirectory(suffix=None, prefix=None, dir=None) This function securely creates a temporary directory using the

2025-01-10 15:47:30
stat.S_ISDIR()
  • References/Python/Python/File & Directory Access

stat.S_ISDIR(mode) Return non-zero if the mode is from a directory.

2025-01-10 15:47:30
pathlib.PurePath.parents
  • References/Python/Python/File & Directory Access

PurePath.parents An immutable sequence providing access to the logical ancestors of the path:

2025-01-10 15:47:30
pathlib.Path.is_dir()
  • References/Python/Python/File & Directory Access

Path.is_dir() Return True if the path points to a directory (or a symbolic link pointing to a directory), False

2025-01-10 15:47:30
fileinput.filename()
  • References/Python/Python/File & Directory Access

fileinput.filename() Return the name of the file currently being read. Before the first line has been read, returns None

2025-01-10 15:47:30
fileinput.hook_compressed()
  • References/Python/Python/File & Directory Access

fileinput.hook_compressed(filename, mode) Transparently opens files compressed with gzip and bzip2 (recognized by the extensions

2025-01-10 15:47:30
filecmp.dircmp.common_files
  • References/Python/Python/File & Directory Access

common_files Files in both a and b.

2025-01-10 15:47:30
shutil.get_unpack_formats()
  • References/Python/Python/File & Directory Access

shutil.get_unpack_formats() Return a list of all registered formats for unpacking. Each element of the returned sequence is

2025-01-10 15:47:30