os.path.basename()
  • References/Python/Python/File & Directory Access

os.path.basename(path) Return the base name of pathname path. This is the second element of the pair returned by passing

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

fileinput.fileno() Return the integer “file descriptor” for the current file. When no file is opened (before the first line

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

os.path.relpath(path, start=os.curdir) Return a relative filepath to path either from the current directory or from

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

tempfile.mkstemp(suffix=None, prefix=None, dir=None, text=False) Creates a temporary file in the most secure manner possible

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

os.path.dirname(path) Return the directory name of pathname path. This is the first element of the pair returned by

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

Path.is_symlink() Return True if the path points to a symbolic link, False otherwise.

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

left_only Files and subdirectories only in a.

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