コード例 #1
0
 async def ls_single(
     self, container: FileContainer, path: str
 ) -> List[FileEntryInfo]:
     response = await self.stub.ls(
         LsRequest(path=path, container=file_container_to_grpc(container))
     )
     return [FileEntryInfo(path=file.path) for file in response.files]
コード例 #2
0
 async def ls(self, container: FileContainer,
              path: str) -> List[FileEntryInfo]:
     response = await self.stub.ls(
         LsRequest(
             bundle_id=file_container_to_bundle_id_deprecated(container),
             path=path,
             container=file_container_to_grpc(container),
         ))
     return [FileEntryInfo(path=file.path) for file in response.files]
コード例 #3
0
 async def ls(self, container: FileContainer, paths: List[str]) -> List[FileListing]:
     response = await self.stub.ls(
         LsRequest(paths=paths, container=file_container_to_grpc(container))
     )
     return [
         FileListing(
             parent=listing.parent.path,
             entries=[FileEntryInfo(path=entry.path) for entry in listing.files],
         )
         for listing in response.listings
     ]
コード例 #4
0
ファイル: grpc.py プロジェクト: zeng4250538/idb
 async def ls(self, bundle_id: str, path: str) -> List[FileEntryInfo]:
     async with self.get_stub() as stub:
         response = await stub.ls(LsRequest(bundle_id=bundle_id, path=path))
         return [FileEntryInfo(path=file.path) for file in response.files]
コード例 #5
0
ファイル: ls.py プロジェクト: sorke/FBSimulatorControl
async def client(
    client: CompanionClient, bundle_id: str, path: str
) -> List[FileEntryInfo]:
    response = await client.stub.ls(LsRequest(bundle_id=bundle_id, path=path))
    return [FileEntryInfo(path=file.path) for file in response.files]