uos.path – Filesystem functions
This module contains miscellaneous functions on filesystem paths.
Functions
- uos.path.isfile(path)
- Check if a - pathto a file is an existing regular file.- Parameters:
- path (str) – Full path to the file. 
- Returns:
- Trueif the- pathis an- existingregular file.
- Return type:
- bool 
 
- uos.path.isdir(path)
- Check if a - pathto a directory is an existing directory.- Parameters:
- path (str) – Full path to the directory. 
- Returns:
- Trueif the- pathis an- existingdirectory.
- Return type:
- bool 
 
- uos.path.exists(path)
- Check if a - pathis an existing file or directory.- Parameters:
- path (str) – Full path to the file or directory. 
- Returns:
- Trueif the- pathreferences an existing file or directory.
- Return type:
- bool 
 - Note - This function may return - Falseif permission is not granted to execute- os.stat()on the requested file, even if the- pathexists.