fs_exists()
def fs_exists(path)Check if a file or directory exists
Args
path-strpath 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-strpath 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-strpath 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-strpath 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-strpath 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-strpath 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-strpath to the JSON file
Returns
dict The parsed JSON object
fs_read_text()
def fs_read_text(path)Read a text file
Args
path-strpath to the text file
Returns
str The content of the text file
fs_read_toml()
def fs_read_toml(path)Read a TOML file
Args
path-strpath to the TOML file
Returns
dict The parsed TOML object
fs_read_yaml()
def fs_read_yaml(path)Read a YAML file
Args
path-strpath to the YAML file
Returns
dict The parsed YAML object
fs_write_text()
def fs_write_text(path, content)Write a text file
Args
path-strpath to the text filecontent-strcontent to write to the text file