def METHOD_NAME(self, path, cmn_flags):
    real_path = self.vm_to_real_path(path)
    if not os.path.exists(real_path):
        return None
    attr = b''
    file_stat = os.stat(real_path)
    filename = ""
    if cmn_flags & ATTR_CMN_NAME != 0:
        filename = path.split("/")[-1]
        filename_len = len(filename) + 1        # add \0
        attr += pack("<L", filename_len)
        self.ql.log.debug("FileName :{}, len:{}".format(filename, filename_len))
    if cmn_flags & ATTR_CMN_DEVID != 0:
        attr += pack("<L", file_stat.st_dev)
        self.ql.log.debug("DevID: {}".format(file_stat.st_dev))
    if cmn_flags & ATTR_CMN_OBJTYPE != 0:
        if os.path.isdir(path):
            attr += pack("<L", VDIR)
            self.ql.log.debug("ObjType: DIR")
        elif os.path.islink(path):
            attr += pack("<L", VLINK)
            self.ql.log.debug("ObjType: LINK")
        else:
            attr += pack("<L", VREG)
            self.ql.log.debug("ObjType: REG")
    if cmn_flags & ATTR_CMN_OBJID != 0:
        attr += pack("<Q", file_stat.st_ino)
        self.ql.log.debug("VnodeID :{}".format(file_stat.st_ino))
    # at last, add name 
    if cmn_flags & ATTR_CMN_NAME != 0:
        name_offset = len(attr) + 4
        attr = pack("<L", name_offset) + attr
        attr += filename.encode("utf8")
        attr += b'\x00'
    self.ql.log.debug("Attr : {}".format(attr))
    return attr