Ejemplo n.º 1
0
 def list_dir_by_commit_and_path(self,
                                 commit_id,
                                 path,
                                 offset=-1,
                                 limit=-1):
     dir_id = seafserv_threaded_rpc.get_dirid_by_path(commit_id, path)
     return seafserv_threaded_rpc.list_dir(dir_id, offset, limit)
Ejemplo n.º 2
0
 def list_dir_by_dir_id(self, repo_id, dir_id, offset=-1, limit=-1):
     """
     Return: a list of Dirent objects. The objects are sorted as follows:
             - Directories are always before files
             - Entries are sorted by names in ascending order
     """
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 3
0
 def list_dir_by_dir_id(self, repo_id, dir_id, offset=-1, limit=-1):
     """
     Return: a list of Dirent objects. The objects are sorted as follows:
             - Directories are always before files
             - Entries are sorted by names in ascending order
     """
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 4
0
 def list_dir_by_commit_and_path(self,
                                 repo_id,
                                 commit_id,
                                 path,
                                 offset=-1,
                                 limit=-1):
     dir_id = seafserv_threaded_rpc.get_dir_id_by_commit_and_path(
         repo_id, commit_id, path)
     if dir_id is None:
         return None
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 5
0
 def list_dir_by_commit_and_path(self, repo_id, commit_id, path, offset=-1, limit=-1):
     try:
         dir_id = seafserv_threaded_rpc.get_dirid_by_path(repo_id, commit_id, path)
     except SearpcError as e:
         if str(e).startswith(SeafileAPI.PATH_NOT_EXIST_PREFIX):
             dir_id = None
         else:
             raise e
     if dir_id is None:
         return None
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 6
0
 def list_dir_by_commit_and_path(self,
                                 repo_id,
                                 commit_id,
                                 path,
                                 offset=-1,
                                 limit=-1):
     try:
         dir_id = seafserv_threaded_rpc.get_dirid_by_path(
             repo_id, commit_id, path)
     except SearpcError as e:
         if str(e).startswith(SeafileAPI.PATH_NOT_EXIST_PREFIX):
             dir_id = None
         else:
             raise e
     if dir_id is None:
         return None
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 7
0
 def list_dir_by_path(self, repo_id, path, offset=-1, limit=-1):
     dir_id = seafserv_threaded_rpc.get_dir_id_by_path(repo_id, path)
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 8
0
 def list_dir_by_dir_id(self, repo_id, dir_id, offset=-1, limit=-1):
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 9
0
 def list_dir_by_commit_and_path(self, repo_id,
                                 commit_id, path, offset=-1, limit=-1):
     dir_id = seafserv_threaded_rpc.get_dirid_by_path(repo_id, commit_id, path)
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 10
0
 def list_dir_by_dir_id(self, repo_id, dir_id, offset=-1, limit=-1):
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)
Ejemplo n.º 11
0
 def list_dir_by_commit_and_path(self, commit_id, path):
     dir_id = seafserv_threaded_rpc.get_dir_id_by_commit_and_path(
         repo_id, path)
     return seafserv_threaded_rpc.list_dir(dir_id)
Ejemplo n.º 12
0
 def list_dir_by_dir_id(self, dir_id):
     return seafserv_threaded_rpc.list_dir(dir_id)
Ejemplo n.º 13
0
 def list_dir_by_commit_and_path(self, commit_id, path):
     dir_id = seafserv_threaded_rpc.get_dir_id_by_commit_and_path(repo_id, path)
     return seafserv_threaded_rpc.list_dir(dir_id)
Ejemplo n.º 14
0
 def list_dir_by_dir_id(self, dir_id):
     return seafserv_threaded_rpc.list_dir(dir_id)
Ejemplo n.º 15
0
 def list_dir_by_path(self, repo_id, path, offset=-1, limit=-1):
     dir_id = seafserv_threaded_rpc.get_dir_id_by_path(repo_id, path)
     if dir_id is None:
         return None
     return seafserv_threaded_rpc.list_dir(repo_id, dir_id, offset, limit)