def _BuildFileFakeFileSystem(
      self, filename, number_of_segments, segment_file_path_specs):
    resolver_context = context.Context()
    file_system = fake_file_system.FakeFileSystem(resolver_context)

    file_system.AddFileEntry(
        u'/', file_entry_type=definitions.FILE_ENTRY_TYPE_DIRECTORY)

    filename, _, extension = filename.partition(u'.')
    number_of_segments += 1

    for segment_number in range(1, number_of_segments):
      if segment_number < 100:
        if extension[1] == u'x':
          path = u'/{0:s}.{1:s}x{2:02d}'.format(
              filename, extension[0], segment_number)
        else:
          path = u'/{0:s}.{1:s}{2:02d}'.format(
              filename, extension[0], segment_number)
      else:
        segment_index = segment_number - 100
        segment_index, remainder = divmod(segment_index, 26)

        if extension[0].islower():
          third_letter = chr(ord(u'a') + remainder)
        else:
          third_letter = chr(ord(u'A') + remainder)

        segment_index, remainder = divmod(segment_index, 26)

        if extension[0].islower():
          second_letter = chr(ord(u'a') + remainder)
        else:
          second_letter = chr(ord(u'A') + remainder)

        first_letter = chr(ord(extension[0]) + segment_index)
        if extension[1] == u'x':
          path = u'/{0:s}.{1:s}x{2:s}{3:s}'.format(
              filename, first_letter, second_letter, third_letter)
        else:
          path = u'/{0:s}.{1:s}{2:s}{3:s}'.format(
              filename, first_letter, second_letter, third_letter)

      file_system.AddFileEntry(path)
      segment_file_path_specs.append(fake_path_spec.FakePathSpec(location=path))

    return file_system
Set data for a mipmap level.
dataset/ETHPy150Open log2timeline/dfvfs/tests/lib/ewf.py/GlobEWFFileTest._BuildFileFakeFileSystem--crossover with--dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/CompressedImageData.set_mipmap_data