storage.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:cloud-volume 作者: seung-lab 项目源码 文件源码
def files_exist(self, file_paths):
        """
        Threaded exists for all file paths. 

        file_paths: (list) file paths to test for existence

        Returns: { filepath: bool }
        """
        results = {}

        def exist_thunk(path, interface):
            results[path] = interface.exists(path)

        for path in file_paths:
            if len(self._threads):
                self.put(partial(exist_thunk, path))
            else:
                exist_thunk(path, self._interface)

        desc = 'Existence Testing' if self.progress else None
        self.wait(desc)

        return results
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号