def __init__(self, data):
        self.filename = data[:0x28].strip('\x00')
        assert self.filename != '', "FileListing has empty filename"
        self.isdirectory = 0x80 & ord(data[0x28]) == 0x80
        self.numblocks = struct.unpack("<I", "%s\x00" % data[0x29:0x29+3])[0] # More little endian madness!
        self.firstblock = struct.unpack("<I", "%s\x00" % data[0x2F:0x2F+3])[0]# And again!
        self.pathindex = struct.unpack(">h", data[0x32:0x34])[0] # Signedness is important here
        self.size = struct.unpack(">I", data[0x34:0x38])[0]
        self.udate = struct.unpack(">H", data[0x38:0x3A])[0]
        self.utime = struct.unpack(">H", data[0x3A:0x3C])[0]
        self.adate = struct.unpack(">H", data[0x3C:0x3E])[0]
        self.atime = struct.unpack(">H", data[0x3E:0x40])[0]
dataset/ETHPy150Open arkem/py360/py360/stfs.py/FileListing.__init__/original