fuse_plugin.py 文件源码

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

项目:obnam 作者: obnam-mirror 项目源码 文件源码
def __init__(self, path, flags, *mode):
        tracing.trace('path=%r', path)
        tracing.trace('flags=%r', flags)
        tracing.trace('mode=%r', mode)

        self.path = path

        if flags & self.write_flags:
            raise IOError(errno.EROFS, 'Read only filesystem')

        self.reading_pid = path == '/.pid'
        if self.reading_pid:
            return

        try:
            self.metadata = self.fuse_fs.get_metadata_in_generation(path)
        except BaseException:
            logging.error('Unexpected exception', exc_info=True)
            raise

        # if not a regular file return EINVAL
        if not stat.S_ISREG(self.metadata.st_mode):
            raise IOError(errno.EINVAL, 'Invalid argument')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号