trigger.core.io
I/O Class Module to handle all read/write operations :created: 19/04/2020 :author: Arda Kutlu <ardakutlu@gmail.com>
Attributes
Classes
dict() -> new empty dictionary |
Module Contents
- class IO(file_name=None, folder_name=None, root_path=None, file_path=None)
Bases:
dictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- static folder_check(checkpath)
Check if the folder exists, create if it doesn’t.
- read(file_path=None)
Read and returns the data stored in file path
- write(data, file_path=None)
Write data to file. Args:
data: <data> Data to be written to the json file file_path: (String) if not specified uses the one defined in the class instantiation.
- Returns:
(String) Path of the file
- property file_path
- Return the file path.
- FILELOG