Documentation ¶
Index ¶
- func Close(handle types.VDiskHandle) (err error)
- func Compact(vDiskHandle types.VDiskHandle, flags ffi.CompactVirtualDiskFlag) error
- func Dismount(handle types.VDiskHandle) (err error)
- func Fork(path types.Path, parentPath types.Path, ...) (handle types.VDiskHandle, err error)
- func GetParents(handle types.VDiskHandle) (resolved bool, parents []types.Path, err error)
- func GetPhysicalPath(handle types.VDiskHandle) (path types.Drive, err error)
- func GetVirtualDiskBackingFiles(drive types.Drive) ([]types.Path, error)
- func Mirror(path types.Path, sourceDiskPath types.Path, ...) (handle types.VDiskHandle, err error)
- func Mount(handle types.VDiskHandle, noDriveLetter bool, readOnly bool) (err error)
- func New(path types.Path, diskType ffi.VirtualStorageTypeDeviceType, sizeBytes uint64, ...) (handle types.VDiskHandle, err error)
- func Open(path types.Path, fileType ffi.VirtualStorageTypeDeviceType, ...) (handle types.VDiskHandle, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compact ¶
func Compact(vDiskHandle types.VDiskHandle, flags ffi.CompactVirtualDiskFlag) error
func Dismount ¶
func Dismount(handle types.VDiskHandle) (err error)
Dismount the virtual drives. Implements: - Dismount-VHD
func Fork ¶
func Fork(path types.Path, parentPath types.Path, diskType ffi.VirtualStorageTypeDeviceType, sizeBytes uint64, blockSizeBytes uint32, physicalSectorSizeBytes uint32) (handle types.VDiskHandle, err error)
Fork a differencing virtual drives from a parent. Implements: - New-VHD -Differencing
func GetParents ¶
GetParents get the parents of the child disk. returns windows.ERROR_VHD_INVALID_TYPE if it is not a differencing drives
func GetPhysicalPath ¶
func GetPhysicalPath(handle types.VDiskHandle) (path types.Drive, err error)
GetPhysicalPath returns normalized drives path of an opened virtual drive. Required permission: virtdisks.VirtualDiskAccessGetInfo
func GetVirtualDiskBackingFiles ¶
GetVirtualDiskBackingFiles returns filesystem paths to all the virtual drives backing paths, sorted from the child to the parent.
func Mirror ¶
func Mirror(path types.Path, sourceDiskPath types.Path, diskType ffi.VirtualStorageTypeDeviceType, dynamic bool, blockSizeBytes uint32) (handle types.VDiskHandle, err error)
Mirror a drives into a new virtual drives. Implements: - New-VHD -SourceDisk
func Mount ¶
func Mount(handle types.VDiskHandle, noDriveLetter bool, readOnly bool) (err error)
Mount the virtual drives. Implements: - Mount-VHD
func New ¶
func New(path types.Path, diskType ffi.VirtualStorageTypeDeviceType, sizeBytes uint64, dynamic bool, blockSizeBytes uint32, logicalSectorSizeBytes uint32, physicalSectorSizeBytes uint32) (handle types.VDiskHandle, err error)
New virtual drives from scratch. Implements: - New-VHD -Dynamic - New-VHD -Fixed Notes: - sizeBytes must be dividable by blockSizeBytes (by default 512), otherwise it returns windows.ERROR_FILE_NOT_FOUND
func Open ¶
func Open(path types.Path, fileType ffi.VirtualStorageTypeDeviceType, accessMask ffi.VirtualDiskAccessMask, openFlags ffi.OpenVirtualDiskFlag) (handle types.VDiskHandle, err error)
Open an existing virtual drives. Implements: - Get-VHD -Path
Types ¶
This section is empty.