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

os.path.isfile(path) Return True if path is an existing regular file. This follows symbolic links, so

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

glob.glob(pathname, *, recursive=False) Return a possibly-empty list of path names that match pathname, which must

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

Path.mkdir(mode=0o777, parents=False, exist_ok=False) Create a new directory at this given path. If mode is given,

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

Path.touch(mode=0o666, exist_ok=True) Create a file at this given path. If mode is given, it is combined with the process’

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

os.path.splitext(path) Split the pathname path into a pair (root, ext) such that root + ext == path

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

os.path.sameopenfile(fp1, fp2) Return True if the file descriptors fp1 and fp2 refer to the same

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

stat.S_ISLNK(mode) Return non-zero if the mode is from a symbolic link.

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

tempfile.mktemp(suffix='', prefix='tmp', dir=None) Deprecated since version

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

PurePath.parent The logical parent of the path: >>>

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

fnmatch.filter(names, pattern) Return the subset of the list of names that match pattern. It is the same as

2025-01-10 15:47:30