fs_exists()
def fs_exists(path)
Check if a file or directory exists
Args
path
-str
path to the file or directory
Returns
bool
True if the file or directory exists, False otherwise
fs_is_directory()
def fs_is_directory(path)
Check if a path is a directory
Args
path
-str
path to the directory
Returns
bool
True if the path is a directory, False otherwise
fs_is_file()
def fs_is_file(path)
Check if a path is a file
Args
path
-str
path to the file
Returns
bool
True if the path is a file, False otherwise
fs_is_symlink()
def fs_is_symlink(path)
Check if a path is a symbolic link
Args
path
-str
path to the symbolic link
Returns
bool
True if the path is a symbolic link, False otherwise
fs_is_text_file()
def fs_is_text_file(path)
Check if a file is a text file
Args
path
-str
path to the file
Returns
bool
True if the file is a text file, False otherwise
fs_read_directory()
def fs_read_directory(path)
Read a directory
Args
path
-str
path to the directory
Returns
[str]
A list of files and directories in the directory
fs_read_json()
def fs_read_json(path)
Read a JSON file
Args
path
-str
path to the JSON file
Returns
dict
The parsed JSON object
fs_read_toml()
def fs_read_toml(path)
Read a TOML file
Args
path
-str
path to the TOML file
Returns
dict
The parsed TOML object
fs_read_yaml()
def fs_read_yaml(path)
Read a YAML file
Args
path
-str
path to the YAML file
Returns
dict
The parsed YAML object