fs_exists()
def fs_exists(path) -> boolCheck if a file or directory exists
Args
path: string: path to the file or directory
Returns
True if the file or directory exists, False otherwise
fs_is_directory()
def fs_is_directory(path) -> boolCheck if a path is a directory
Args
path: string: path to the directory
Returns
True if the path is a directory, False otherwise
fs_is_file()
def fs_is_file(path) -> boolCheck if a path is a file
Args
path: string: path to the file
Returns
True if the path is a file, False otherwise
fs_is_symlink()
def fs_is_symlink(path) -> boolCheck if a path is a symbolic link
Args
path: string: path to the symbolic link
Returns
True if the path is a symbolic link, False otherwise
fs_is_text_file()
def fs_is_text_file(path) -> boolCheck if a file is a text file
Args
path: string: path to the file
Returns
True if the file is a text file, False otherwise
fs_read_directory()
def fs_read_directory(path) -> listRead a directory
Args
path: string: path to the directory
Returns
A list of files and directories in the directory
fs_read_json()
def fs_read_json(path) -> dictRead a JSON file
Args
path: string: path to the JSON file
Returns
The parsed JSON object
fs_read_text()
def fs_read_text(path) -> stringRead a text file
Args
path: string: path to the text file
Returns
The content of the text file
fs_read_toml()
def fs_read_toml(path) -> dictRead a TOML file
Args
path: string: path to the TOML file
Returns
The parsed TOML object
fs_read_yaml()
def fs_read_yaml(path) -> dictRead a YAML file
Args
path: string: path to the YAML file
Returns
The parsed YAML object
fs_write_text()
def fs_write_text(path, content)Write a text file
Args
path: string: path to the text filecontent: string: content to write to the text file