wiz.filesystem¶
-
wiz.filesystem.get_name()[source]¶ Fetch user full name from password database entry.
Returns: User name of None if name cannot be returned.
-
wiz.filesystem.export(path, content, compressed=False, overwrite=False)[source]¶ Create file from content in path.
Parameters: - path – Target path to save the file.
- content – Content string to write in path.
- compressed – Indicate whether exported file should be compressed. Default is False.
- overwrite – Indicate whether any existing path will be overwritten. Default is False.
Raise: wiz.exception.FileExistsif overwrite is False and path already exists.
-
wiz.filesystem.is_accessible(folder_path)[source]¶ Indicate whether the folder path is accessible.
Parameters: folder_path – Path to the folder to analyze. Returns: Boolean value.
-
wiz.filesystem.ensure_directory(path)[source]¶ Ensure directory exists at path.
Parameters: path – Path to the folder to create. Raise: OSErroris path is a file.
-
wiz.filesystem.sanitize_value(value, substitution_character='_', case_sensitive=True)[source]¶ Return value suitable for use with filesystem.
Parameters: - value – String value to sanitize.
- substitution_character – Symbol to replace awkward characters with. Default is underscore.
- case_sensitive – Indicate whether case should be preserved or if value should be converted to lowercase. Default is True.
Returns: Sanitized value.