pathlib.PurePath.as_posix()
  • References/Python/Python/File & Directory Access

PurePath.as_posix() Return a string representation of the path with forward slashes (/):

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

stat.S_ISLNK(mode) Return non-zero if the mode is from a symbolic link.

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
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
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
pathlib.PurePath.parent
  • References/Python/Python/File & Directory Access

PurePath.parent The logical parent of the path: >>>

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

PurePath.with_name(name) Return a new path with the name changed. If the original path doesn’t have a name, ValueError

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

report() Print (to sys

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

os.path.getsize(path) Return the size, in bytes, of path. Raise

2025-01-10 15:47:30