tools.py 文件源码

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

项目:python-lunrclient 作者: rackerlabs 项目源码 文件源码
def get_volume(self, id):
        """
        return volume information if the argument is an id or a path
        """
        # If the id is actually a path
        if exists(id):
            with open(id) as file:
                size = os.lseek(file.fileno(), 0, os.SEEK_END)
            return {'path': id, 'size': size}
        return self.volume.get(id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号