def write(self, path, data): LocalOperation.mkdir(os.path.dirname(path)) with open(path, "w+") as stream: yaml.dump(data, stream, allow_unicode=True, default_flow_style=False)
def _init(): if not LocalOperation.exist(GPM_SRC): LocalOperation.mkdir(GPM_SRC)
def __file_exist(self): db_dir = os.path.dirname(self.__path) if not LocalOperation.exist(db_dir): LocalOperation.mkdir(db_dir) return LocalOperation.exist(self.__path)