'Returns the size of the data on disk'

def get_size(self):

    if self.file_size:
        return self.file_size
    else:
        try:
            return os.path.getsize(self.file_name)
        except OSError:
            return 0
