- create :: FilePath -> CreateParameters -> IO ()
- data CreateParameters = CreateParameters {}
- defaultCreateParameters :: CreateParameters
- getInfo :: FilePath -> IO (Either String (Header, Footer))
- data Block
- readBlock :: Block -> Int -> Int -> IO ByteString
- writeBlock :: Block -> ByteString -> Int -> IO ()
- withBlock :: FilePath -> BlockSize -> Word32 -> (Block -> IO a) -> IO a
- data Context = Context {}
- withVhdContext :: FilePath -> (Context -> IO r) -> IO r
- extendBlock :: Context -> Int -> IO ()
- data Header = Header {
- headerCookie :: Cookie
- headerDataOffset :: Offset
- headerTableOffset :: Offset
- headerVersion :: Version
- headerMaxTableEntries :: EntryCount
- headerBlockSize :: BlockSize
- headerCheckSum :: CheckSum
- headerParentUniqueId :: UniqueId
- headerParentTimeStamp :: TimeStamp
- headerReserved1 :: ByteString
- headerParentUnicodeName :: ParentUnicodeName
- headerParentLocatorEntries :: ParentLocatorEntries
- data Footer = Footer {
- footerCookie :: Cookie
- footerIsTemporaryDisk :: Bool
- footerFormatVersion :: Version
- footerDataOffset :: Offset
- footerTimeStamp :: TimeStamp
- footerCreatorApplication :: CreatorApplication
- footerCreatorVersion :: Version
- footerCreatorHostOs :: CreatorHostOs
- footerOriginalSize :: Size
- footerCurrentSize :: Size
- footerDiskGeometry :: DiskGeometry
- footerDiskType :: DiskType
- footerCheckSum :: CheckSum
- footerUniqueId :: UniqueId
- footerIsSavedState :: Bool
- data BatmapHeader = BatmapHeader {}
- type BlockSize = Word32
- type DiskGeometryCylinders = Word16
- type DiskGeometryHeads = Word8
- type DiskGeometrySectorsPerTrack = Word8
- type CheckSum = Word32
- type EntryCount = Word32
- type Offset = Word64
- type Size = Word64
- type TimeStamp = 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
create an empty vhd with the specified parameters
getInfo :: FilePath -> IO (Either String (Header, Footer))Source
grab the header and footer from a vhd file.
block related operations
writeBlock :: Block -> ByteString -> Int -> IO ()Source
withBlock :: FilePath -> BlockSize -> Word32 -> (Block -> IO a) -> IO aSource
mmap a block using a filepath, a blocksize
ctx related operations
extendBlock :: Context -> Int -> IO ()Source
exported Types
type DiskGeometryHeads = Word8Source
type EntryCount = 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