def __getFileInfo(self, path):
        try:
            data_ref = self._session.query(db.DataRef)\
                .filter(db.DataRef.url_raw==hlp.to_db_format(path))\
                .options(joinedload_all("items"))\
                .options(joinedload_all("items.item_tags.tag"))\
                .options(joinedload_all("items.item_fields.field"))\
                .one()
            self._session.expunge(data_ref)
            finfo = FileInfo(data_ref.url, objType=FileInfo.FILE, status=FileInfo.STORED)

            for item in data_ref.items:
                finfo.itemIds.append(item.id)
                for item_tag in item.item_tags:
                    finfo.tags.append(item_tag.tag.name)
                for item_field in item.item_fields:
                    finfo.fields.append((item_field.field.name, item_field.field_value))
            return finfo

        except NoResultFound:
            return FileInfo(self.__relPath, status=FileInfo.UNTRACKED)