'Unpack a Thrift "Stat" object into a dictionary that looks like fs.stat'

@staticmethod
def _unpack_stat(stat):

    mode = stat.perms
    if stat.isDir:
        mode |= statconsts.S_IFDIR
    else:
        mode |= statconsts.S_IFREG
    return {'path': decode_fs_path(stat.path), 'size': stat.length, 'mtime': (stat.mtime / 1000), 'mode': mode, 'user': stat.owner, 'group': stat.group, 'atime': stat.atime}
