Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileFactory ¶
type FileFactory struct {
// contains filtered or unexported fields
}
FileFactory is a type to create VhdFile representing VHD in the local machine
func (*FileFactory) Create ¶
func (f *FileFactory) Create(vhdPath string) (*VhdFile, error)
Create creates a new VhdFile representing a VHD in the local machine located at vhdPath
func (*FileFactory) CreateFromReaderAtReader ¶
func (f *FileFactory) CreateFromReaderAtReader(r reader.ReadAtReader, size int64) (*VhdFile, error)
CreateFromReaderAtReader creates a new VhdFile from a reader.ReadAtReader, which is a reader associated with a VHD in the local machine. The parameter size is the size of the VHD in bytes
func (*FileFactory) Dispose ¶
func (f *FileFactory) Dispose(err error)
Dispose disposes this instance of VhdFileFactory and VhdFileFactory instances of parent and child VHDs
type VhdFile ¶
type VhdFile struct { footer.Footer Header *header.Header // BlockAllocationTable represents the table holding absolute offset to the first sector // of blocks in the disk. Only Dynamic and Differencing disk has BAT. BlockAllocationTable *bat.BlockAllocationTable // VhdReader is the reader that can be used to read the disk. VhdReader *reader.VhdReader // Parent represents the parent VHD of Differencing disk, this field is nil for fixed // and dynamic disk. Parent *VhdFile }Footer *
VhdFile represents a VHD.
func (*VhdFile) GetBlockFactory ¶
GetBlockFactory returns a BlockFactory instance that can be used to create Block instances that represents blocks in the disk.
func (*VhdFile) GetDiskType ¶
GetDiskType returns the type of the disk. Possible values are DiskTypeFixed, DiskTypeDynamic and DiskTypeDifferencing.
func (*VhdFile) GetIdentityChain ¶
GetIdentityChain returns VHD identity chain, for differencing disk this will be a slice with unique ids of this and all it's ancestor disks. For fixed and dynamic disk, this will be a slice with one entry representing disk's unique id.