tempfile.mktemp()
  • References/Python/Python/File & Directory Access

tempfile.mktemp(suffix='', prefix='tmp', dir=None) Deprecated since version

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

exception shutil.SameFileError This exception is raised if source and destination in copyfile() are the same file

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

shutil.copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2, ignore_dangling_symlinks=False) Recursively copy

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

shutil.copymode(src, dst, *, follow_symlinks=True) Copy the permission bits from src to dst. The file contents

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

Path.is_char_device() Return True if the path points to a character device (or a symbolic link pointing to a character

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

PurePath.parts A tuple giving access to the path’s various components:

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

class pathlib.Path(*pathsegments) A subclass of PurePath, this class represents concrete paths of the system’s

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

os.path.splitext(path) Split the pathname path into a pair (root, ext) such that root + ext == path

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

linecache.getline(filename, lineno, module_globals=None) Get line lineno from file named filename. This function

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

Path.iterdir() When the path points to a directory, yield path objects of the directory contents:

2025-01-10 15:47:30