stat.S_ISREG()
  • References/Python/Python/File & Directory Access

stat.S_ISREG(mode) Return non-zero if the mode is from a regular file.

2025-01-10 15:47:30
os.path.isfile()
  • References/Python/Python/File & Directory Access

os.path.isfile(path) Return True if path is an existing regular file. This follows symbolic links, so

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.joinpath()
  • References/Python/Python/File & Directory Access

PurePath.joinpath(*other) Calling this method is equivalent to combining the path with each of the other arguments

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

Path.rename(target) Rename this file or directory to the given target. On Unix, if target exists and is a

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
tempfile.gettempprefix()
  • References/Python/Python/File & Directory Access

tempfile.gettempprefix() Return the filename prefix used to create temporary files. This does not contain the directory component

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
shutil.copyfileobj()
  • References/Python/Python/File & Directory Access

shutil.copyfileobj(fsrc, fdst[, length]) Copy the contents of the file-like object fsrc to the file-like object fdst

2025-01-10 15:47:30
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