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

os.path.splitdrive(path) Split the pathname path into a pair (drive, tail) where drive is either

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

tempfile.mkdtemp(suffix=None, prefix=None, dir=None) Creates a temporary directory in the most secure manner possible. There

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

Path.is_socket() Return True if the path points to a Unix socket (or a symbolic link pointing to a Unix socket)

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

shutil.get_terminal_size(fallback=(columns, lines)) Get the size of the terminal window. For

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

PurePath.match(pattern) Match this path against the provided glob-style pattern. Return True if matching is successful

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

Path.lchmod(mode) Like Path.chmod() but, if the path points to a symbolic link, the symbolic link’s mode is changed

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

PurePath.relative_to(*other) Compute a version of this path relative to the path represented by other. If it’s impossible

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

class filecmp.dircmp(a, b, ignore=None, hide=None) Construct a new directory comparison object, to compare the directories a

2025-01-10 15:47:30