FileManager¶
vtool.util_file.FileManager (filepath[, …]) |
Convenience to deal with file write/read. |
-
class
FileManager
(filepath, skip_warning=False)¶ Convenience to deal with file write/read.
Parameters: - filepath (str) – Path to the file to work on.
- skip_warning (bool) – Wether to print warnings out or not.
-
read_file
()¶ Start read the file.
-
write_file
()¶ Start write the file.
-
append_file
()¶ Start append file.
-
close_file
()¶ Close file.
-
get_open_file
()¶ Get open file object.
-
warning_if_invalid_folder
(warning_text)¶ Check if folder is invalid and raise and error.
-
warning_if_invalid_file
(warning_text)¶ Check if file is invalid and raise and error.
-
warning_if_invlid_path
(warning_text)¶ Check if path to file is invalid and raise error.