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
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
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
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
filecmp.dircmp.common_funny
  • References/Python/Python/File & Directory Access

common_funny Names in both a and b, such that the type differs between the directories, or names for which

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

Path.samefile(other_path) Return whether this path points to the same file as other_path, which can be either a Path

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

PurePath.drive A string representing the drive letter or name, if any:

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

Path.exists() Whether the path points to an existing file or directory:

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

fileinput.nextfile() Close the current file so that the next iteration will read the first line from the next file (if any);

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