def check_env(self): # Check if BASE directory exists if not path.exists(self.base_dir): FileOperations(self.user_id).mkdir(self.base_dir) # Check if USER directory exists if not path.exists(self.home_dir): FileOperations(self.user_id).mkdir(self.home_dir) print(self.home_dir+" Created...") else: print(self.home_dir+" Exists...")
def rename(self, file_path, new_name): return FileOperations(self.user_id).rename(file_path, new_name)
def mkdir(self, dir_arr): return FileOperations(self.user_id).mkdir(dir_arr)
def ls(self, dir): return FileOperations(self.user_id).ls(dir)
def move(self, src_arr, dest_arr): return FileOperations(self.user_id).move(src_arr, dest_arr)
def upload(self, file_dir, file): return FileOperations(self.user_id).upload(file_dir, file)
def copy(self, file_arr, destination_path): operation = FileOperations(self.user_id) return operation.copy(file_arr, destination_path)
def delete(self, file_arr): return FileOperations(self.user_id).delete(file_arr)