[project]
name: "libvmdk"
status: "alpha"
year_of_creation: "2009"
data_format: "VMware Virtual Disk (VMDK)"
documentation_url: "https://github.com/libyal/libvmdk/tree/main/documentation"
features: ["debug_output", "nuget"]

[library]
build_dependencies: ["zlib"]
description: "Library to access the VMware Virtual Disk (VMDK) format"
public_types: ["extent_descriptor", "handle"]

[tools]
build_dependencies: ["fuse"]
description: "Several tools for reading VMware Virtual Disk (VMDK) files"
names: ["vmdkinfo", "vmdkmount"]

[mount_tool]
features: ["multi_source", "parent"]
file_entry_type: "handle"
file_entry_type_size_value: "media_size"
mounted_description: "a device file that provides the RAW storage media data contained in the VMDK image"
source: "image.vmdk"
source_description: "a VMDK image"
source_description_long: "a VMware Virtual Disk (VMDK) image file"
source_type: "image"

[troubleshooting]
example: "vmdkinfo image.vmdk"

[development]
features: ["pytsk3"]
main_object: "handle"
main_object_filename: "image.vmdk"
main_object_post_open_python: [
    "vmdk_handle.open_extent_data_files()"]
main_object_post_open_file_object_python: [
    "base_directory = os.path.dirname(filename)",
    "",
    "extent_data_files = []",
    "for extent_descriptor in vmdk_handle.extent_descriptors:",
    "  extent_data_filename = extent_descriptor.filename",
    "",
    "  _, path_separator, filename = extent_data_filename.rpartition(\"/\")",
    "  if not path_separator:",
    "    _, path_separator, filename = extent_data_filename.rpartition(\"\\\\\")",
    "",
    "  if not path_separator:",
    "    filename = extent_data_filename",
    "",
    "  extent_data_file_path = os.path.join(base_directory, filename)",
    "",
    "  if not os.path.exists(extent_data_file_path):",
    "    break",
    "",
    "  extent_data_files.append(extent_data_file_path)",
    "",
    "if len(extent_data_files) != vmdk_handle.number_of_extents:",
    "  raise RuntimeError(\"Unable to locate all extent data files.\")",
    "",
    "file_objects = []",
    "for extent_data_file_path in extent_data_files:",
    "  file_object = open(extent_data_file_path, \"rb\")",
    "  file_objects.append(file_object)",
    "",
    "vmdk_handle.open_extent_data_files_file_objects(file_objects)"]
main_object_size: "media_size"

[tests]
profiles: ["libvmdk", "pyvmdk", "vmdkinfo"]
info_tool_options_per_profile: [""]
info_tool_profiles: ["vmdkinfo"]
example_filename1: "image1.vmdk"
example_filename2: "image2.vmdk"

[pypi]
appveyor_token: "VHuZiUWgTqTciKE2nsv/LoLP8ouDmPjIMgnsuPtr8vWz0URFT4+aVTsCC6xyAD0q2VD/Uw09mz3r7eEfAKdZDSdswAwWiFqmXdQZfvvRZNg19Pi8iHBARXUOgYM7kCDeWBisgjR349kN6UhSIyq24nMukdtrum1RutN4ATNH9yxIPIEZ6ueIM4z3y7p0lwxGlY1m2CE7RpYqlgdqpS5BkOLhKILqeuHdv5T68d3k2fydAWW9T72BtSahdBsezBD9pWZgs0m5JV1MRnWX+S7ENA=="

