def _get_file_size(self):
        """
        Fetches file size by reading the Content-Length header
        for the resource.
        :return: File size.
        """
        file_size = retry(self._retry_count)(_get_content_length)(
            self._session, self.url, self._timeout
        )
        file_size = int(file_size)
        if file_size == 0:
            with io.open(self._file_path, 'a', encoding='utf-8'):
                pass
        return file_size