Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDiskutilPath ¶
GetDiskutilPath executes `which diskutil` and returns path
func GetMountedVolumes ¶
func GetOsVersion ¶
GetOsVersion executes `sw_vers -productVersion` command and returns semver compliant version on success
func UnmountDisk ¶
Types ¶
type DiskInfo ¶
type DiskInfo struct { Content string `plist:"Content"` DeviceIdentifier string `plist:"DeviceIdentifier"` DeviceNode string `plist:"DeviceNode"` DiskUUID string `plist:"DiskUUID"` VolumeName string `plist:"VolumeName"` VolumeUUID string `plist:"VolumeUUID"` ParentWholeDisk string `plist:"ParentWholeDisk"` WholeDisk bool `plist:"WholeDisk"` MountPoint string `plist:"MountPoint"` FilesystemName string `plist:"FilesystemName"` FilesystemUserVisibleName string `plist:"FilesystemUserVisibleName"` FilesystemType string `plist:"FilesystemType"` APFSContainerReference string `plist:"APFSContainerReference"` APFSPhysicalStores []struct { APFSPhysicalStore string `plist:"APFSPhysicalStore"` } `plist:"APFSPhysicalStores"` }
func GetDiskInfo ¶
GetDiskInfo executes `diskutil info -plist <disk>` command and returns DiskInfo
func GetVolumeInfo ¶
func (*DiskInfo) GetApfsPhysicalStores ¶
func (*DiskInfo) IsApfsContainer ¶
func (*DiskInfo) IsCoreStorageContainer ¶
type DiskList ¶
type DiskList struct { AllDisks []string `plist:"AllDisks"` VolumesFromDisks []string `plist:"VolumesFromDisks"` WholeDisks []string `plist:"WholeDisks"` }
func GetDiskList ¶
GetDiskList executes `diskutil list -plist` and returns DiskList
type Disks ¶
type Disks struct {
// contains filtered or unexported fields
}
func (*Disks) FindEfiFor ¶
FindEfiFor will try to find the EFI volume, owned by the provided disk.
func (*Disks) FindParentFor ¶
FindParentFor will try to the root physical storage.
func (*Disks) GetIdentifiers ¶
Click to show internal directories.
Click to hide internal directories.