myfuse.py 文件源码

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

项目:Encryped-file-system 作者: kittenish 项目源码 文件源码
def getattr(self, path, fh=None):
        '''
        Returns a dictionary with keys identical to the stat C structure of
        stat(2).

        st_atime, st_mtime and st_ctime should be floats.

        NOTE: There is an incombatibility between Linux and Mac OS X
        concerning st_nlink of directories. Mac OS X counts all files inside
        the directory, while Linux counts only the subdirectories.
        '''

        if path != '/':
            raise FuseOSError(ENOENT)
        return dict(st_mode=(S_IFDIR | 0o755), st_nlink=2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号