def _get_stat(self):
        rv = self._stat
        if rv is not None:
            return rv

        try:
            st = os.stat(self.filename)
            mtime = int(st.st_mtime)
            if stat.S_ISDIR(st.st_mode):
                size = len(os.listdir(self.filename))
                is_dir = True
            else:
                size = int(st.st_size)
                is_dir = False
            rv = mtime, size, is_dir
        except __HOLE__:
            rv = 0, -1, False
        self._stat = rv
        return rv
dataset/ETHPy150Open lektor/lektor/lektor/builder.py/FileInfo._get_stat