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

classmethod Path.cwd() Return a new path object representing the current directory (as returned by

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

Path.read_bytes() Return the binary contents of the pointed-to file as a bytes object:

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

Path.chmod(mode) Change the file mode and permissions, like

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

os.path.getatime(path) Return the time of last access of path. The return value is a number giving the number of seconds

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

fileinput.filelineno() Return the line number in the current file. Before the first line has been read, returns 0

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
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