def get_files_in_folder(self, root_folder): client = self.get_dropbox_client() files = [] for file in client.metadata(root_folder)["contents"]: if not file["is_dir"]: files.append(file["path"]) return files
def get_subfolders(self, root_folder): client = self.get_dropbox_client() folders = [] for folder in client.metadata(root_folder)["contents"]: if folder["is_dir"]: folders.append(folder["path"][len(root_folder) :]) return folders