os.path.abspath(path) Return a normalized absolutized version of the pathname path. On most platforms, this is equivalent
os.path.isdir(path) Return True if path is an existing directory. This follows symbolic links, so both
linecache.checkcache(filename=None) Check the cache for validity. Use this function if files in the cache may have changed on
right The directory b.
tempfile.gettempdir() Return the name of the directory used for temporary files. This defines the default value for the dir
linecache.clearcache() Clear the cache. Use this function if you no longer need lines from files previously read using getline()
os.path.exists(path) Return True if path refers to an existing path or an open file descriptor. Returns
Path.write_text(data, encoding=None, errors=None) Open the file pointed to in text mode, write data to it, and close
Path.rmdir() Remove this directory. The directory must be empty.
PurePath.stem The final path component, without its suffix:
Page 11 of 19