

def get_size(self):
    if self.is_directory():
        return 0
    else:
        data_attribute = self._record.data_attribute()
        if (data_attribute is not None):
            if (data_attribute.non_resident() == 0):
                size = len(data_attribute.value())
            else:
                size = data_attribute.data_size()
        else:
            size = self._record.filename_information().logical_size()
    return size

dataset/ETHPy150Open williballenthin/python-ntfs/ntfs/filesystem/__init__.py NTFSFileMetadataMixin.get_size/original