shutil.rmtree()
  • References/Python/Python/File & Directory Access

shutil.rmtree(path, ignore_errors=False, onerror=None) Delete an entire directory tree; path must point to a directory

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

os.path.samestat(stat1, stat2) Return True if the stat tuples stat1 and stat2 refer to the same

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

report_partial_closure() Print a comparison between a and b and common immediate subdirectories.

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

fileinput.lineno() Return the cumulative line number of the line that has just been read. Before the first line has been read

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

shutil.copy(src, dst, *, follow_symlinks=True) Copies the file src to the file or directory dst. src

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

classmethod Path.home() Return a new path object representing the user’s home directory (as returned by

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

glob.escape(pathname) Escape all special characters ('?', '*' and '['). This is useful

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

Path.stat() Return information about this path (similarly to

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

os.path.commonpath(paths) Return the longest common sub-path of each pathname in the sequence paths. Raise ValueError

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

fileinput.close() Close the sequence.

2025-01-10 15:47:30