pathlib.PurePath.name
  • References/Python/Python/File & Directory Access

PurePath.name A string representing the final path component, excluding the drive and root, if any:

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

stat.S_ISDOOR(mode) Return non-zero if the mode is from a door.

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

Path.is_file() Return True if the path points to a regular file (or a symbolic link pointing to a regular file)

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

fnmatch.fnmatch(filename, pattern) Test whether the filename string matches the pattern string, returning

2025-01-10 15:47:30
shutil.rmtree.avoids_symlink_attacks
  • References/Python/Python/File & Directory Access

rmtree.avoids_symlink_attacks Indicates whether the current platform and implementation provides a symlink attack resistant

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

funny_files Files which are in both a and b, but could not be compared.

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

class pathlib.PurePath(*pathsegments) A generic class that represents the system’s path flavour (instantiating it creates either

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

The modules described in this chapter deal with disk files and directories. For example, there are modules for reading the properties of files, manipulating paths in a portable

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

os.path.getctime(path) Return the system’s ctime which, on some systems (like Unix) is the time of the last metadata change

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

os.path.expanduser(path) On Unix and Windows, return the argument with an initial component of ~ or ~user

2025-01-10 15:47:30