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 not in self.repo.get_commit_dates() and path != '/':
            raise FuseOSError(ENOENT)

        attrs = super(HistoryView, self).getattr(path, fh)
        attrs.update({
            'st_mode': S_IFDIR | 0o555,
            'st_nlink': 2,
            'st_ctime': self._get_first_commit_time(),
            'st_mtime': self._get_last_commit_time(),
        })

        return attrs
dataset/ETHPy150Open PressLabs/gitfs/gitfs/views/history.py/HistoryView.getattr/original