pathlib.PosixPath
  • References/Python/Python/File & Directory Access

class pathlib.PosixPath(*pathsegments) A subclass of Path and PurePosixPath, this class represents

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

Path.read_text(encoding=None, errors=None) Return the decoded contents of the pointed-to file as a string:

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

os.path.commonprefix(list) Return the longest path prefix (taken character-by-character) that is a prefix of all paths in list

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

same_files Files which are identical in both a and b, using the class’s file comparison operator.

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

stat.S_ISFIFO(mode) Return non-zero if the mode is from a FIFO (named pipe).

2025-01-10 15:47:30