- create :: FilePath -> CreateParameters -> IO ()
- data CreateParameters = CreateParameters {
- createBlockSize :: BlockByteCount
- createDiskType :: DiskType
- createParentTimeStamp :: Maybe TimeStamp
- createParentUnicodeName :: Maybe ParentUnicodeName
- createParentUniqueId :: Maybe UniqueId
- createTimeStamp :: Maybe TimeStamp
- createUuid :: Maybe UniqueId
- createUseBatmap :: Bool
- createVirtualSize :: VirtualByteCount
- defaultCreateParameters :: CreateParameters
- getInfo :: FilePath -> IO (Either String (Header, Footer))
- snapshot :: Vhd -> FilePath -> IO ()
- readData :: Vhd -> IO ByteString
- readDataRange :: Vhd -> VirtualByteAddress -> VirtualByteCount -> IO ByteString
- writeDataRange :: Vhd -> VirtualByteAddress -> ByteString -> IO ()
- withVhd :: FilePath -> (Vhd -> IO a) -> IO a
- data Header = Header {
- headerCookie :: Cookie
- headerDataOffset :: PhysicalByteAddress
- headerTableOffset :: PhysicalByteAddress
- headerVersion :: Version
- headerMaxTableEntries :: VirtualBlockCount
- headerBlockSize :: BlockByteCount
- headerChecksum :: Checksum
- headerParentUniqueId :: UniqueId
- headerParentTimeStamp :: TimeStamp
- headerReserved1 :: ByteString
- headerParentUnicodeName :: ParentUnicodeName
- headerParentLocatorEntries :: ParentLocatorEntries
- data Footer = Footer {
- footerCookie :: Cookie
- footerIsTemporaryDisk :: Bool
- footerFormatVersion :: Version
- footerDataOffset :: PhysicalByteAddress
- footerTimeStamp :: TimeStamp
- footerCreatorApplication :: CreatorApplication
- footerCreatorVersion :: Version
- footerCreatorHostOs :: CreatorHostOs
- footerOriginalSize :: VirtualByteCount
- footerCurrentSize :: VirtualByteCount
- footerDiskGeometry :: DiskGeometry
- footerDiskType :: DiskType
- footerChecksum :: Checksum
- footerUniqueId :: UniqueId
- footerIsSavedState :: Bool
- data BatmapHeader = BatmapHeader {}
- 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
- type VersionMajor = Word16
- type VersionMinor = Word16
- data CreatorHostOs
- data DiskGeometry = DiskGeometry DiskGeometryCylinders DiskGeometryHeads DiskGeometrySectorsPerTrack
- data DiskType
- newtype Cookie = Cookie ByteString
- newtype CreatorApplication = CreatorApplication ByteString
- newtype ParentLocatorEntry = ParentLocatorEntry ByteString
- newtype ParentUnicodeName = ParentUnicodeName String
- newtype UniqueId = UniqueId ByteString
- newtype ParentLocatorEntries = ParentLocatorEntries [ParentLocatorEntry]
- randomUniqueId :: IO UniqueId
Documentation
create :: FilePath -> CreateParameters -> IO ()Source
Creates an empty VHD file with the specified parameters.
data CreateParameters Source
getInfo :: FilePath -> IO (Either String (Header, Footer))Source
Retrieves the header and footer from a VHD file.
readData :: Vhd -> IO ByteStringSource
Reads data from the whole virtual address space of the given VHD.
readDataRange :: Vhd -> VirtualByteAddress -> VirtualByteCount -> IO ByteStringSource
Reads data from the given virtual address range of the given VHD.
writeDataRange :: Vhd -> VirtualByteAddress -> ByteString -> IO ()Source
Writes data to the given virtual address of the given VHD.
type BlockByteAddress = Word32Source
type BlockByteCount = Word32Source
type BlockSectorAddress = Word32Source
type BlockSectorCount = Word32Source
type DiskGeometryHeads = Word8Source
type PhysicalByteAddress = Word64Source
type PhysicalByteCount = Word64Source
type PhysicalSectorCount = Word32Source
type VirtualBlockAddress = Word32Source
type VirtualBlockCount = Word32Source
type VirtualByteAddress = Word64Source
type VirtualByteCount = Word64Source
type VirtualSectorAddress = Word32Source
type VirtualSectorCount = Word32Source
type VersionMajor = Word16Source
type VersionMinor = Word16Source
data CreatorHostOs Source
data DiskGeometry Source
newtype CreatorApplication Source
newtype ParentLocatorEntry Source
newtype ParentUnicodeName Source
newtype ParentLocatorEntries Source