-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Provides functions to inspect and manipulate virtual hard disk (VHD) files. -- -- Provides functions to inspect and manipulate virtual hard disk (VHD) -- files, according to the VHD specification (version 1.0). @package vhd @version 0.2 module Data.Vhd -- | Creates an empty VHD file with the specified parameters. create :: FilePath -> CreateParameters -> IO () data CreateParameters CreateParameters :: BlockByteCount -> DiskType -> Maybe TimeStamp -> Maybe ParentUnicodeName -> Maybe UniqueId -> Maybe TimeStamp -> Maybe UniqueId -> Bool -> VirtualByteCount -> CreateParameters createBlockSize :: CreateParameters -> BlockByteCount createDiskType :: CreateParameters -> DiskType createParentTimeStamp :: CreateParameters -> Maybe TimeStamp createParentUnicodeName :: CreateParameters -> Maybe ParentUnicodeName createParentUniqueId :: CreateParameters -> Maybe UniqueId createTimeStamp :: CreateParameters -> Maybe TimeStamp createUuid :: CreateParameters -> Maybe UniqueId createUseBatmap :: CreateParameters -> Bool createVirtualSize :: CreateParameters -> VirtualByteCount defaultCreateParameters :: CreateParameters -- | Retrieves the header and footer from a VHD file. getInfo :: FilePath -> IO (Either String (Header, Footer)) snapshot :: Vhd -> FilePath -> IO () -- | Reads data from the whole virtual address space of the given VHD. readData :: Vhd -> IO ByteString -- | Reads data from the given virtual address range of the given VHD. readDataRange :: Vhd -> VirtualByteAddress -> VirtualByteCount -> IO ByteString -- | Writes data to the given virtual address of the given VHD. writeDataRange :: Vhd -> VirtualByteAddress -> ByteString -> IO () withVhd :: FilePath -> (Vhd -> IO a) -> IO a data Header Header :: Cookie -> PhysicalByteAddress -> PhysicalByteAddress -> Version -> VirtualBlockCount -> BlockByteCount -> Checksum -> UniqueId -> TimeStamp -> ByteString -> ParentUnicodeName -> ParentLocatorEntries -> Header headerCookie :: Header -> Cookie headerDataOffset :: Header -> PhysicalByteAddress headerTableOffset :: Header -> PhysicalByteAddress headerVersion :: Header -> Version headerMaxTableEntries :: Header -> VirtualBlockCount headerBlockSize :: Header -> BlockByteCount headerChecksum :: Header -> Checksum headerParentUniqueId :: Header -> UniqueId headerParentTimeStamp :: Header -> TimeStamp headerReserved1 :: Header -> ByteString headerParentUnicodeName :: Header -> ParentUnicodeName headerParentLocatorEntries :: Header -> ParentLocatorEntries data Footer Footer :: Cookie -> Bool -> Version -> PhysicalByteAddress -> TimeStamp -> CreatorApplication -> Version -> CreatorHostOs -> VirtualByteCount -> VirtualByteCount -> DiskGeometry -> DiskType -> Checksum -> UniqueId -> Bool -> Footer footerCookie :: Footer -> Cookie footerIsTemporaryDisk :: Footer -> Bool footerFormatVersion :: Footer -> Version footerDataOffset :: Footer -> PhysicalByteAddress footerTimeStamp :: Footer -> TimeStamp footerCreatorApplication :: Footer -> CreatorApplication footerCreatorVersion :: Footer -> Version footerCreatorHostOs :: Footer -> CreatorHostOs footerOriginalSize :: Footer -> VirtualByteCount footerCurrentSize :: Footer -> VirtualByteCount footerDiskGeometry :: Footer -> DiskGeometry footerDiskType :: Footer -> DiskType footerChecksum :: Footer -> Checksum footerUniqueId :: Footer -> UniqueId footerIsSavedState :: Footer -> Bool data BatmapHeader BatmapHeader :: Cookie -> PhysicalByteAddress -> Word32 -> Version -> Checksum -> BatmapHeader batmapHeaderCookie :: BatmapHeader -> Cookie batmapHeaderOffset :: BatmapHeader -> PhysicalByteAddress batmapHeaderSize :: BatmapHeader -> Word32 batmapHeaderVersion :: BatmapHeader -> Version batmapHeaderChecksum :: BatmapHeader -> Checksum type BlockByteAddress = Word32 type BlockByteCount = Word32 type BlockSectorAddress = Word32 type BlockSectorCount = Word32 type DiskGeometryCylinders = Word16 type DiskGeometryHeads = Word8 type DiskGeometrySectorsPerTrack = Word8 type Checksum = Word32 type PhysicalByteAddress = Word64 type PhysicalByteCount = Word64 type PhysicalSectorAddress = Word32 type PhysicalSectorCount = Word32 type TimeStamp = Word32 type VirtualBlockAddress = Word32 type VirtualBlockCount = Word32 type VirtualByteAddress = Word64 type VirtualByteCount = Word64 type VirtualSectorAddress = Word32 type VirtualSectorCount = Word32 data Version Version :: VersionMajor -> VersionMinor -> Version type VersionMajor = Word16 type VersionMinor = Word16 data CreatorHostOs CreatorHostOsUnknown :: CreatorHostOs CreatorHostOsWindows :: CreatorHostOs CreatorHostOsMacintosh :: CreatorHostOs data DiskGeometry DiskGeometry :: DiskGeometryCylinders -> DiskGeometryHeads -> DiskGeometrySectorsPerTrack -> DiskGeometry data DiskType DiskTypeFixed :: DiskType DiskTypeDynamic :: DiskType DiskTypeDifferencing :: DiskType newtype Cookie Cookie :: ByteString -> Cookie newtype CreatorApplication CreatorApplication :: ByteString -> CreatorApplication newtype ParentLocatorEntry ParentLocatorEntry :: ByteString -> ParentLocatorEntry newtype ParentUnicodeName ParentUnicodeName :: String -> ParentUnicodeName newtype UniqueId UniqueId :: ByteString -> UniqueId newtype ParentLocatorEntries ParentLocatorEntries :: [ParentLocatorEntry] -> ParentLocatorEntries randomUniqueId :: IO UniqueId instance Show CreateParameters instance Eq CreateParameters