Documentation
¶
Overview ¶
Package diskarbitration provides Go bindings for the DiskArbitration framework.
Provides mechanisms to register and block disk mount or unmount events.
For related documentation, see Mac Technology Overview.
Variables ¶
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- func BindFunc(fptr any, name string) (err error)
- func DAApprovalSessionGetTypeID() uint
- func DAApprovalSessionScheduleWithRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, ...)
- func DAApprovalSessionUnscheduleFromRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, ...)
- func DADiskClaim(disk DADiskRef, options DADiskClaimOptions, release DADiskClaimReleaseCallback, ...)
- func DADiskCopyDescription(disk DADiskRef) corefoundation.CFDictionaryRef
- func DADiskCopyIOMedia(disk DADiskRef) uint32
- func DADiskEject(disk DADiskRef, options DADiskEjectOptions, callback DADiskEjectCallback, ...)
- func DADiskGetBSDName(disk DADiskRef) *byte
- func DADiskGetTypeID() uint
- func DADiskIsClaimed(disk DADiskRef) bool
- func DADiskMount(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, ...)
- func DADiskMountWithArguments(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, ...)
- func DADiskRename(disk DADiskRef, name corefoundation.CFStringRef, options DADiskRenameOptions, ...)
- func DADiskUnclaim(disk DADiskRef)
- func DADiskUnmount(disk DADiskRef, options DADiskUnmountOptions, callback DADiskUnmountCallback, ...)
- func DADissenterGetStatusString(dissenter DADissenterRef) corefoundation.CFStringRef
- func DARegisterDiskAppearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DARegisterDiskDescriptionChangedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DARegisterDiskDisappearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DARegisterDiskEjectApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DARegisterDiskMountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DARegisterDiskPeekCallback(session DASessionRef, match corefoundation.CFDictionaryRef, order int, ...)
- func DARegisterDiskUnmountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...)
- func DASessionGetTypeID() uint
- func DASessionScheduleWithRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, ...)
- func DASessionSetDispatchQueue(session DASessionRef, queue dispatch.Queue)
- func DASessionUnscheduleFromRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, ...)
- func DAUnregisterApprovalCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer)
- func DAUnregisterCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer)
- func SymbolAddress(name string) (uintptr, error)
- func TryDAApprovalSessionGetTypeID() (uint, error)
- func TryDAApprovalSessionScheduleWithRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, ...) error
- func TryDAApprovalSessionUnscheduleFromRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, ...) error
- func TryDADiskClaim(disk DADiskRef, options DADiskClaimOptions, release DADiskClaimReleaseCallback, ...) error
- func TryDADiskCopyDescription(disk DADiskRef) (corefoundation.CFDictionaryRef, error)
- func TryDADiskCopyIOMedia(disk DADiskRef) (uint32, error)
- func TryDADiskEject(disk DADiskRef, options DADiskEjectOptions, callback DADiskEjectCallback, ...) error
- func TryDADiskGetBSDName(disk DADiskRef) (*byte, error)
- func TryDADiskGetTypeID() (uint, error)
- func TryDADiskIsClaimed(disk DADiskRef) (bool, error)
- func TryDADiskMount(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, ...) error
- func TryDADiskMountWithArguments(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, ...) error
- func TryDADiskRename(disk DADiskRef, name corefoundation.CFStringRef, options DADiskRenameOptions, ...) error
- func TryDADiskUnclaim(disk DADiskRef) error
- func TryDADiskUnmount(disk DADiskRef, options DADiskUnmountOptions, callback DADiskUnmountCallback, ...) error
- func TryDADissenterGetStatusString(dissenter DADissenterRef) (corefoundation.CFStringRef, error)
- func TryDARegisterDiskAppearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDARegisterDiskDescriptionChangedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDARegisterDiskDisappearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDARegisterDiskEjectApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDARegisterDiskMountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDARegisterDiskPeekCallback(session DASessionRef, match corefoundation.CFDictionaryRef, order int, ...) error
- func TryDARegisterDiskUnmountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, ...) error
- func TryDASessionGetTypeID() (uint, error)
- func TryDASessionScheduleWithRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, ...) error
- func TryDASessionSetDispatchQueue(session DASessionRef, queue dispatch.Queue) error
- func TryDASessionUnscheduleFromRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, ...) error
- func TryDAUnregisterApprovalCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer) error
- func TryDAUnregisterCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer) error
- type DAApprovalSessionRef
- type DADiskAppearedCallback
- type DADiskClaimCallback
- type DADiskClaimOptions
- type DADiskClaimReleaseCallback
- type DADiskDescriptionChangedCallback
- type DADiskDisappearedCallback
- type DADiskEjectApprovalCallback
- type DADiskEjectCallback
- type DADiskEjectOptions
- type DADiskMountApprovalCallback
- type DADiskMountCallback
- type DADiskMountOptions
- type DADiskOptions
- type DADiskPeekCallback
- type DADiskRef
- func DADiskCopyWholeDisk(disk DADiskRef) DADiskRef
- func DADiskCreateFromBSDName(allocator corefoundation.CFAllocatorRef, session DASessionRef, name string) DADiskRef
- func DADiskCreateFromIOMedia(allocator corefoundation.CFAllocatorRef, session DASessionRef, media uint32) DADiskRef
- func DADiskCreateFromVolumePath(allocator corefoundation.CFAllocatorRef, session DASessionRef, ...) DADiskRef
- func TryDADiskCopyWholeDisk(disk DADiskRef) (DADiskRef, error)
- func TryDADiskCreateFromBSDName(allocator corefoundation.CFAllocatorRef, session DASessionRef, name string) (DADiskRef, error)
- func TryDADiskCreateFromIOMedia(allocator corefoundation.CFAllocatorRef, session DASessionRef, media uint32) (DADiskRef, error)
- func TryDADiskCreateFromVolumePath(allocator corefoundation.CFAllocatorRef, session DASessionRef, ...) (DADiskRef, error)
- type DADiskRenameCallback
- type DADiskRenameOptions
- type DADiskUnmountApprovalCallback
- type DADiskUnmountCallback
- type DADiskUnmountOptions
- type DADissenterRef
- type DAReturn
- func DADiskSetOptions(disk DADiskRef, options DADiskOptions, value bool) DAReturn
- func DADissenterGetStatus(dissenter DADissenterRef) DAReturn
- func TryDADiskSetOptions(disk DADiskRef, options DADiskOptions, value bool) (DAReturn, error)
- func TryDADissenterGetStatus(dissenter DADissenterRef) (DAReturn, error)
- type DASessionRef
- type KDADiskClaimOption
- type KDADiskEjectOption
- type KDADiskMountOption
- type KDADiskOption
- type KDADiskRenameOption
- type KDADiskUnmountOption
- type KDAReturn
Constants ¶
This section is empty.
Variables ¶
var ( // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionBusNameKey KDADiskDescriptionBusNameKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionBusPathKey KDADiskDescriptionBusPathKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceGUIDKey KDADiskDescriptionDeviceGUIDKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceInternalKey KDADiskDescriptionDeviceInternalKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceModelKey KDADiskDescriptionDeviceModelKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDevicePathKey KDADiskDescriptionDevicePathKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceProtocolKey KDADiskDescriptionDeviceProtocolKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceRevisionKey KDADiskDescriptionDeviceRevisionKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceTDMLockedKey KDADiskDescriptionDeviceTDMLockedKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceUnitKey KDADiskDescriptionDeviceUnitKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionDeviceVendorKey KDADiskDescriptionDeviceVendorKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionFSKitPrefix KDADiskDescriptionFSKitPrefix string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaBSDMajorKey KDADiskDescriptionMediaBSDMajorKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaBSDMinorKey KDADiskDescriptionMediaBSDMinorKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaBSDNameKey KDADiskDescriptionMediaBSDNameKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaBSDUnitKey KDADiskDescriptionMediaBSDUnitKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaBlockSizeKey KDADiskDescriptionMediaBlockSizeKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaContentKey KDADiskDescriptionMediaContentKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaEjectableKey KDADiskDescriptionMediaEjectableKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaEncryptedKey KDADiskDescriptionMediaEncryptedKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaEncryptionDetailKey KDADiskDescriptionMediaEncryptionDetailKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaIconKey KDADiskDescriptionMediaIconKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaKindKey KDADiskDescriptionMediaKindKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaLeafKey KDADiskDescriptionMediaLeafKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaNameKey KDADiskDescriptionMediaNameKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaPathKey KDADiskDescriptionMediaPathKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaRemovableKey KDADiskDescriptionMediaRemovableKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaSizeKey KDADiskDescriptionMediaSizeKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaTypeKey KDADiskDescriptionMediaTypeKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaUUIDKey KDADiskDescriptionMediaUUIDKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaWholeKey KDADiskDescriptionMediaWholeKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMediaWritableKey KDADiskDescriptionMediaWritableKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionRepairRunningKey KDADiskDescriptionRepairRunningKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeKindKey KDADiskDescriptionVolumeKindKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeMountableKey KDADiskDescriptionVolumeMountableKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeNameKey KDADiskDescriptionVolumeNameKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeNetworkKey KDADiskDescriptionVolumeNetworkKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumePathKey KDADiskDescriptionVolumePathKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeTypeKey KDADiskDescriptionVolumeTypeKey string // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionVolumeUUIDKey KDADiskDescriptionVolumeUUIDKey string )
var ( // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMatchMediaUnformatted KDADiskDescriptionMatchMediaUnformatted corefoundation.CFDictionaryRef // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMatchMediaWhole KDADiskDescriptionMatchMediaWhole corefoundation.CFDictionaryRef // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMatchVolumeMountable KDADiskDescriptionMatchVolumeMountable corefoundation.CFDictionaryRef // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionMatchVolumeUnrecognized KDADiskDescriptionMatchVolumeUnrecognized corefoundation.CFDictionaryRef )
var ( // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionWatchVolumeName KDADiskDescriptionWatchVolumeName corefoundation.CFArrayRef // See: https://developer.apple.com/documentation/DiskArbitration/kDADiskDescriptionWatchVolumePath KDADiskDescriptionWatchVolumePath corefoundation.CFArrayRef )
Functions ¶
func BindFunc ¶
BindFunc binds the DiskArbitration symbol name into fptr, which must be a pointer to a func variable.
The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.
func DAApprovalSessionGetTypeID ¶
func DAApprovalSessionGetTypeID() uint
DAApprovalSessionGetTypeID.
It panics if DAApprovalSessionGetTypeID is unavailable at run time; use TryDAApprovalSessionGetTypeID to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAApprovalSessionGetTypeID
func DAApprovalSessionScheduleWithRunLoop ¶
func DAApprovalSessionScheduleWithRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef)
DAApprovalSessionScheduleWithRunLoop.
It panics if DAApprovalSessionScheduleWithRunLoop is unavailable at run time; use TryDAApprovalSessionScheduleWithRunLoop to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAApprovalSessionScheduleWithRunLoop
func DAApprovalSessionUnscheduleFromRunLoop ¶
func DAApprovalSessionUnscheduleFromRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef)
DAApprovalSessionUnscheduleFromRunLoop.
It panics if DAApprovalSessionUnscheduleFromRunLoop is unavailable at run time; use TryDAApprovalSessionUnscheduleFromRunLoop to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAApprovalSessionUnscheduleFromRunLoop
func DADiskClaim ¶
func DADiskClaim(disk DADiskRef, options DADiskClaimOptions, release DADiskClaimReleaseCallback, releaseContext unsafe.Pointer, callback DADiskClaimCallback, callbackContext unsafe.Pointer)
DADiskClaim claims the specified disk object for exclusive use.
It panics if DADiskClaim is unavailable at run time; use TryDADiskClaim to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskClaim(_:_:_:_:_:_:)
func DADiskCopyDescription ¶
func DADiskCopyDescription(disk DADiskRef) corefoundation.CFDictionaryRef
DADiskCopyDescription obtains the Disk Arbitration description of the specified disk.
It panics if DADiskCopyDescription is unavailable at run time; use TryDADiskCopyDescription to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCopyDescription(_:)
func DADiskCopyIOMedia ¶
DADiskCopyIOMedia obtains the I/O Kit media object for the specified disk.
It panics if DADiskCopyIOMedia is unavailable at run time; use TryDADiskCopyIOMedia to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCopyIOMedia(_:)
func DADiskEject ¶
func DADiskEject(disk DADiskRef, options DADiskEjectOptions, callback DADiskEjectCallback, context unsafe.Pointer)
DADiskEject ejects the specified disk object.
It panics if DADiskEject is unavailable at run time; use TryDADiskEject to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskEject(_:_:_:_:)
func DADiskGetBSDName ¶
DADiskGetBSDName obtains the BSD device name for the specified disk.
It panics if DADiskGetBSDName is unavailable at run time; use TryDADiskGetBSDName to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskGetBSDName(_:)
func DADiskGetTypeID ¶
func DADiskGetTypeID() uint
DADiskGetTypeID returns the type identifier of all DADisk instances.
It panics if DADiskGetTypeID is unavailable at run time; use TryDADiskGetTypeID to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskGetTypeID()
func DADiskIsClaimed ¶
DADiskIsClaimed reports whether or not the disk is claimed.
It panics if DADiskIsClaimed is unavailable at run time; use TryDADiskIsClaimed to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskIsClaimed(_:)
func DADiskMount ¶
func DADiskMount(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, callback DADiskMountCallback, context unsafe.Pointer)
DADiskMount mounts the volume at the specified disk object.
It panics if DADiskMount is unavailable at run time; use TryDADiskMount to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskMount(_:_:_:_:_:)
func DADiskMountWithArguments ¶
func DADiskMountWithArguments(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, callback DADiskMountCallback, context unsafe.Pointer, arguments *corefoundation.CFStringRef)
DADiskMountWithArguments mounts the volume at the specified disk object, with the specified mount options.
It panics if DADiskMountWithArguments is unavailable at run time; use TryDADiskMountWithArguments to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskMountWithArguments(_:_:_:_:_:_:)
func DADiskRename ¶
func DADiskRename(disk DADiskRef, name corefoundation.CFStringRef, options DADiskRenameOptions, callback DADiskRenameCallback, context unsafe.Pointer)
DADiskRename renames the volume at the specified disk object.
It panics if DADiskRename is unavailable at run time; use TryDADiskRename to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskRename(_:_:_:_:_:)
func DADiskUnclaim ¶
func DADiskUnclaim(disk DADiskRef)
DADiskUnclaim unclaims the specified disk object.
It panics if DADiskUnclaim is unavailable at run time; use TryDADiskUnclaim to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskUnclaim(_:)
func DADiskUnmount ¶
func DADiskUnmount(disk DADiskRef, options DADiskUnmountOptions, callback DADiskUnmountCallback, context unsafe.Pointer)
DADiskUnmount unmounts the volume at the specified disk object.
It panics if DADiskUnmount is unavailable at run time; use TryDADiskUnmount to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskUnmount(_:_:_:_:)
func DADissenterGetStatusString ¶
func DADissenterGetStatusString(dissenter DADissenterRef) corefoundation.CFStringRef
DADissenterGetStatusString obtains the return code string.
It panics if DADissenterGetStatusString is unavailable at run time; use TryDADissenterGetStatusString to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADissenterGetStatusString(_:)
func DARegisterDiskAppearedCallback ¶
func DARegisterDiskAppearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskAppearedCallback, context unsafe.Pointer)
DARegisterDiskAppearedCallback registers a callback function to be called whenever a disk has appeared.
It panics if DARegisterDiskAppearedCallback is unavailable at run time; use TryDARegisterDiskAppearedCallback to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DARegisterDiskAppearedCallback(_:_:_:_:)
func DARegisterDiskDescriptionChangedCallback ¶
func DARegisterDiskDescriptionChangedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, watch corefoundation.CFArrayRef, callback DADiskDescriptionChangedCallback, context unsafe.Pointer)
DARegisterDiskDescriptionChangedCallback registers a callback function to be called whenever a disk description has changed.
It panics if DARegisterDiskDescriptionChangedCallback is unavailable at run time; use TryDARegisterDiskDescriptionChangedCallback to get an error instead.
func DARegisterDiskDisappearedCallback ¶
func DARegisterDiskDisappearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskDisappearedCallback, context unsafe.Pointer)
DARegisterDiskDisappearedCallback registers a callback function to be called whenever a disk has disappeared.
It panics if DARegisterDiskDisappearedCallback is unavailable at run time; use TryDARegisterDiskDisappearedCallback to get an error instead.
func DARegisterDiskEjectApprovalCallback ¶
func DARegisterDiskEjectApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskEjectApprovalCallback, context unsafe.Pointer)
DARegisterDiskEjectApprovalCallback registers a callback function to be called whenever a volume is to be ejected.
It panics if DARegisterDiskEjectApprovalCallback is unavailable at run time; use TryDARegisterDiskEjectApprovalCallback to get an error instead.
func DARegisterDiskMountApprovalCallback ¶
func DARegisterDiskMountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskMountApprovalCallback, context unsafe.Pointer)
DARegisterDiskMountApprovalCallback registers a callback function to be called whenever a volume is to be mounted.
It panics if DARegisterDiskMountApprovalCallback is unavailable at run time; use TryDARegisterDiskMountApprovalCallback to get an error instead.
func DARegisterDiskPeekCallback ¶
func DARegisterDiskPeekCallback(session DASessionRef, match corefoundation.CFDictionaryRef, order int, callback DADiskPeekCallback, context unsafe.Pointer)
DARegisterDiskPeekCallback registers a callback function to be called whenever a disk has been probed.
It panics if DARegisterDiskPeekCallback is unavailable at run time; use TryDARegisterDiskPeekCallback to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DARegisterDiskPeekCallback(_:_:_:_:_:)
func DARegisterDiskUnmountApprovalCallback ¶
func DARegisterDiskUnmountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskUnmountApprovalCallback, context unsafe.Pointer)
DARegisterDiskUnmountApprovalCallback registers a callback function to be called whenever a volume is to be unmounted.
It panics if DARegisterDiskUnmountApprovalCallback is unavailable at run time; use TryDARegisterDiskUnmountApprovalCallback to get an error instead.
func DASessionGetTypeID ¶
func DASessionGetTypeID() uint
DASessionGetTypeID returns the type identifier of all DASession instances.
It panics if DASessionGetTypeID is unavailable at run time; use TryDASessionGetTypeID to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DASessionGetTypeID()
func DASessionScheduleWithRunLoop ¶
func DASessionScheduleWithRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef)
DASessionScheduleWithRunLoop schedules the session on a run loop.
It panics if DASessionScheduleWithRunLoop is unavailable at run time; use TryDASessionScheduleWithRunLoop to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DASessionScheduleWithRunLoop(_:_:_:)
func DASessionSetDispatchQueue ¶
func DASessionSetDispatchQueue(session DASessionRef, queue dispatch.Queue)
DASessionSetDispatchQueue schedules the session on a dispatch queue.
It panics if DASessionSetDispatchQueue is unavailable at run time; use TryDASessionSetDispatchQueue to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DASessionSetDispatchQueue(_:_:)
func DASessionUnscheduleFromRunLoop ¶
func DASessionUnscheduleFromRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef)
DASessionUnscheduleFromRunLoop unschedules the session from a run loop.
It panics if DASessionUnscheduleFromRunLoop is unavailable at run time; use TryDASessionUnscheduleFromRunLoop to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DASessionUnscheduleFromRunLoop(_:_:_:)
func DAUnregisterApprovalCallback ¶
func DAUnregisterApprovalCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer)
DAUnregisterApprovalCallback unregisters a registered callback function.
It panics if DAUnregisterApprovalCallback is unavailable at run time; use TryDAUnregisterApprovalCallback to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAUnregisterApprovalCallback
func DAUnregisterCallback ¶
func DAUnregisterCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer)
DAUnregisterCallback unregisters a registered callback function.
It panics if DAUnregisterCallback is unavailable at run time; use TryDAUnregisterCallback to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAUnregisterCallback(_:_:_:)
func SymbolAddress ¶
SymbolAddress returns the address of name in DiskArbitration, whether or not this package generated a binding for it.
What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.
The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.
func TryDAApprovalSessionGetTypeID ¶
TryDAApprovalSessionGetTypeID is like DAApprovalSessionGetTypeID but returns an error instead of panicking if DAApprovalSessionGetTypeID is unavailable at run time.
func TryDAApprovalSessionScheduleWithRunLoop ¶
func TryDAApprovalSessionScheduleWithRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef) error
TryDAApprovalSessionScheduleWithRunLoop is like DAApprovalSessionScheduleWithRunLoop but returns an error instead of panicking if DAApprovalSessionScheduleWithRunLoop is unavailable at run time.
func TryDAApprovalSessionUnscheduleFromRunLoop ¶
func TryDAApprovalSessionUnscheduleFromRunLoop(session DAApprovalSessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef) error
TryDAApprovalSessionUnscheduleFromRunLoop is like DAApprovalSessionUnscheduleFromRunLoop but returns an error instead of panicking if DAApprovalSessionUnscheduleFromRunLoop is unavailable at run time.
func TryDADiskClaim ¶
func TryDADiskClaim(disk DADiskRef, options DADiskClaimOptions, release DADiskClaimReleaseCallback, releaseContext unsafe.Pointer, callback DADiskClaimCallback, callbackContext unsafe.Pointer) error
TryDADiskClaim is like DADiskClaim but returns an error instead of panicking if DADiskClaim is unavailable at run time.
func TryDADiskCopyDescription ¶
func TryDADiskCopyDescription(disk DADiskRef) (corefoundation.CFDictionaryRef, error)
TryDADiskCopyDescription is like DADiskCopyDescription but returns an error instead of panicking if DADiskCopyDescription is unavailable at run time.
func TryDADiskCopyIOMedia ¶
TryDADiskCopyIOMedia is like DADiskCopyIOMedia but returns an error instead of panicking if DADiskCopyIOMedia is unavailable at run time.
func TryDADiskEject ¶
func TryDADiskEject(disk DADiskRef, options DADiskEjectOptions, callback DADiskEjectCallback, context unsafe.Pointer) error
TryDADiskEject is like DADiskEject but returns an error instead of panicking if DADiskEject is unavailable at run time.
func TryDADiskGetBSDName ¶
TryDADiskGetBSDName is like DADiskGetBSDName but returns an error instead of panicking if DADiskGetBSDName is unavailable at run time.
func TryDADiskGetTypeID ¶
TryDADiskGetTypeID is like DADiskGetTypeID but returns an error instead of panicking if DADiskGetTypeID is unavailable at run time.
func TryDADiskIsClaimed ¶
TryDADiskIsClaimed is like DADiskIsClaimed but returns an error instead of panicking if DADiskIsClaimed is unavailable at run time.
func TryDADiskMount ¶
func TryDADiskMount(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, callback DADiskMountCallback, context unsafe.Pointer) error
TryDADiskMount is like DADiskMount but returns an error instead of panicking if DADiskMount is unavailable at run time.
func TryDADiskMountWithArguments ¶
func TryDADiskMountWithArguments(disk DADiskRef, path corefoundation.CFURLRef, options DADiskMountOptions, callback DADiskMountCallback, context unsafe.Pointer, arguments *corefoundation.CFStringRef) error
TryDADiskMountWithArguments is like DADiskMountWithArguments but returns an error instead of panicking if DADiskMountWithArguments is unavailable at run time.
func TryDADiskRename ¶
func TryDADiskRename(disk DADiskRef, name corefoundation.CFStringRef, options DADiskRenameOptions, callback DADiskRenameCallback, context unsafe.Pointer) error
TryDADiskRename is like DADiskRename but returns an error instead of panicking if DADiskRename is unavailable at run time.
func TryDADiskUnclaim ¶
TryDADiskUnclaim is like DADiskUnclaim but returns an error instead of panicking if DADiskUnclaim is unavailable at run time.
func TryDADiskUnmount ¶
func TryDADiskUnmount(disk DADiskRef, options DADiskUnmountOptions, callback DADiskUnmountCallback, context unsafe.Pointer) error
TryDADiskUnmount is like DADiskUnmount but returns an error instead of panicking if DADiskUnmount is unavailable at run time.
func TryDADissenterGetStatusString ¶
func TryDADissenterGetStatusString(dissenter DADissenterRef) (corefoundation.CFStringRef, error)
TryDADissenterGetStatusString is like DADissenterGetStatusString but returns an error instead of panicking if DADissenterGetStatusString is unavailable at run time.
func TryDARegisterDiskAppearedCallback ¶
func TryDARegisterDiskAppearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskAppearedCallback, context unsafe.Pointer) error
TryDARegisterDiskAppearedCallback is like DARegisterDiskAppearedCallback but returns an error instead of panicking if DARegisterDiskAppearedCallback is unavailable at run time.
func TryDARegisterDiskDescriptionChangedCallback ¶
func TryDARegisterDiskDescriptionChangedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, watch corefoundation.CFArrayRef, callback DADiskDescriptionChangedCallback, context unsafe.Pointer) error
TryDARegisterDiskDescriptionChangedCallback is like DARegisterDiskDescriptionChangedCallback but returns an error instead of panicking if DARegisterDiskDescriptionChangedCallback is unavailable at run time.
func TryDARegisterDiskDisappearedCallback ¶
func TryDARegisterDiskDisappearedCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskDisappearedCallback, context unsafe.Pointer) error
TryDARegisterDiskDisappearedCallback is like DARegisterDiskDisappearedCallback but returns an error instead of panicking if DARegisterDiskDisappearedCallback is unavailable at run time.
func TryDARegisterDiskEjectApprovalCallback ¶
func TryDARegisterDiskEjectApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskEjectApprovalCallback, context unsafe.Pointer) error
TryDARegisterDiskEjectApprovalCallback is like DARegisterDiskEjectApprovalCallback but returns an error instead of panicking if DARegisterDiskEjectApprovalCallback is unavailable at run time.
func TryDARegisterDiskMountApprovalCallback ¶
func TryDARegisterDiskMountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskMountApprovalCallback, context unsafe.Pointer) error
TryDARegisterDiskMountApprovalCallback is like DARegisterDiskMountApprovalCallback but returns an error instead of panicking if DARegisterDiskMountApprovalCallback is unavailable at run time.
func TryDARegisterDiskPeekCallback ¶
func TryDARegisterDiskPeekCallback(session DASessionRef, match corefoundation.CFDictionaryRef, order int, callback DADiskPeekCallback, context unsafe.Pointer) error
TryDARegisterDiskPeekCallback is like DARegisterDiskPeekCallback but returns an error instead of panicking if DARegisterDiskPeekCallback is unavailable at run time.
func TryDARegisterDiskUnmountApprovalCallback ¶
func TryDARegisterDiskUnmountApprovalCallback(session DASessionRef, match corefoundation.CFDictionaryRef, callback DADiskUnmountApprovalCallback, context unsafe.Pointer) error
TryDARegisterDiskUnmountApprovalCallback is like DARegisterDiskUnmountApprovalCallback but returns an error instead of panicking if DARegisterDiskUnmountApprovalCallback is unavailable at run time.
func TryDASessionGetTypeID ¶
TryDASessionGetTypeID is like DASessionGetTypeID but returns an error instead of panicking if DASessionGetTypeID is unavailable at run time.
func TryDASessionScheduleWithRunLoop ¶
func TryDASessionScheduleWithRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef) error
TryDASessionScheduleWithRunLoop is like DASessionScheduleWithRunLoop but returns an error instead of panicking if DASessionScheduleWithRunLoop is unavailable at run time.
func TryDASessionSetDispatchQueue ¶
func TryDASessionSetDispatchQueue(session DASessionRef, queue dispatch.Queue) error
TryDASessionSetDispatchQueue is like DASessionSetDispatchQueue but returns an error instead of panicking if DASessionSetDispatchQueue is unavailable at run time.
func TryDASessionUnscheduleFromRunLoop ¶
func TryDASessionUnscheduleFromRunLoop(session DASessionRef, runLoop corefoundation.CFRunLoopRef, runLoopMode corefoundation.CFStringRef) error
TryDASessionUnscheduleFromRunLoop is like DASessionUnscheduleFromRunLoop but returns an error instead of panicking if DASessionUnscheduleFromRunLoop is unavailable at run time.
func TryDAUnregisterApprovalCallback ¶
func TryDAUnregisterApprovalCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer) error
TryDAUnregisterApprovalCallback is like DAUnregisterApprovalCallback but returns an error instead of panicking if DAUnregisterApprovalCallback is unavailable at run time.
func TryDAUnregisterCallback ¶
func TryDAUnregisterCallback(session DASessionRef, callback unsafe.Pointer, context unsafe.Pointer) error
TryDAUnregisterCallback is like DAUnregisterCallback but returns an error instead of panicking if DAUnregisterCallback is unavailable at run time.
Types ¶
type DAApprovalSessionRef ¶
type DAApprovalSessionRef uintptr
See: https://developer.apple.com/documentation/DiskArbitration/DAApprovalSessionRef
func DAApprovalSessionCreate ¶
func DAApprovalSessionCreate(allocator corefoundation.CFAllocatorRef) DAApprovalSessionRef
DAApprovalSessionCreate.
It panics if DAApprovalSessionCreate is unavailable at run time; use TryDAApprovalSessionCreate to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DAApprovalSessionCreate
func TryDAApprovalSessionCreate ¶
func TryDAApprovalSessionCreate(allocator corefoundation.CFAllocatorRef) (DAApprovalSessionRef, error)
TryDAApprovalSessionCreate is like DAApprovalSessionCreate but returns an error instead of panicking if DAApprovalSessionCreate is unavailable at run time.
type DADiskAppearedCallback ¶
DADiskAppearedCallback is type of the callback function used by DARegisterDiskAppearedCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskAppearedCallback
type DADiskClaimCallback ¶
type DADiskClaimCallback = func(disk DADiskRef, dissenter DADissenterRef, context unsafe.Pointer)
DADiskClaimCallback is type of the callback function used by DADiskClaim().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskClaimCallback
type DADiskClaimOptions ¶ added in v0.5.1
type DADiskClaimOptions = uint32
DADiskClaimOptions is options for DADiskClaim().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskClaimOptions
type DADiskClaimReleaseCallback ¶
type DADiskClaimReleaseCallback = func(disk DADiskRef, context unsafe.Pointer) DADissenterRef
DADiskClaimReleaseCallback is type of the callback function used by DADiskClaim().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskClaimReleaseCallback
type DADiskDescriptionChangedCallback ¶
DADiskDescriptionChangedCallback is type of the callback function used by DARegisterDiskDescriptionChangedCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskDescriptionChangedCallback
type DADiskDisappearedCallback ¶
DADiskDisappearedCallback is type of the callback function used by DARegisterDiskDisappearedCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskDisappearedCallback
type DADiskEjectApprovalCallback ¶
type DADiskEjectApprovalCallback = func(disk DADiskRef, context unsafe.Pointer) DADissenterRef
DADiskEjectApprovalCallback is type of the callback function used by DARegisterDiskEjectApprovalCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskEjectApprovalCallback
type DADiskEjectCallback ¶
type DADiskEjectCallback = func(disk DADiskRef, dissenter DADissenterRef, context unsafe.Pointer)
DADiskEjectCallback is type of the callback function used by DADiskEject().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskEjectCallback
type DADiskEjectOptions ¶
type DADiskEjectOptions = uint32
DADiskEjectOptions is options for DADiskEject().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskEjectOptions
type DADiskMountApprovalCallback ¶
type DADiskMountApprovalCallback = func(disk DADiskRef, context unsafe.Pointer) DADissenterRef
DADiskMountApprovalCallback is type of the callback function used by DARegisterDiskMountApprovalCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskMountApprovalCallback
type DADiskMountCallback ¶
type DADiskMountCallback = func(disk DADiskRef, dissenter DADissenterRef, context unsafe.Pointer)
DADiskMountCallback is type of the callback function used by DADiskMount().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskMountCallback
type DADiskMountOptions ¶
type DADiskMountOptions = uint32
DADiskMountOptions is options for DADiskMount().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskMountOptions
type DADiskOptions ¶
type DADiskOptions = uint32
DADiskOptions is options for DADiskGetOptions() and DADiskSetOptions().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskOptions
func DADiskGetOptions ¶
func DADiskGetOptions(disk DADiskRef) DADiskOptions
DADiskGetOptions obtains the options for the specified disk.
It panics if DADiskGetOptions is unavailable at run time; use TryDADiskGetOptions to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskGetOptions(_:)
func TryDADiskGetOptions ¶
func TryDADiskGetOptions(disk DADiskRef) (DADiskOptions, error)
TryDADiskGetOptions is like DADiskGetOptions but returns an error instead of panicking if DADiskGetOptions is unavailable at run time.
type DADiskPeekCallback ¶
DADiskPeekCallback is type of the callback function used by DARegisterDiskPeekCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskPeekCallback
type DADiskRef ¶
type DADiskRef uintptr
DADiskRef is type of a reference to DADisk instances.
See: https://developer.apple.com/documentation/DiskArbitration/DADisk
func DADiskCopyWholeDisk ¶
DADiskCopyWholeDisk obtain the associated whole disk object for the specified disk.
It panics if DADiskCopyWholeDisk is unavailable at run time; use TryDADiskCopyWholeDisk to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCopyWholeDisk(_:)
func DADiskCreateFromBSDName ¶
func DADiskCreateFromBSDName(allocator corefoundation.CFAllocatorRef, session DASessionRef, name string) DADiskRef
DADiskCreateFromBSDName creates a new disk object.
It panics if DADiskCreateFromBSDName is unavailable at run time; use TryDADiskCreateFromBSDName to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCreateFromBSDName(_:_:_:)
func DADiskCreateFromIOMedia ¶
func DADiskCreateFromIOMedia(allocator corefoundation.CFAllocatorRef, session DASessionRef, media uint32) DADiskRef
DADiskCreateFromIOMedia creates a new disk object.
It panics if DADiskCreateFromIOMedia is unavailable at run time; use TryDADiskCreateFromIOMedia to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCreateFromIOMedia(_:_:_:)
func DADiskCreateFromVolumePath ¶
func DADiskCreateFromVolumePath(allocator corefoundation.CFAllocatorRef, session DASessionRef, path corefoundation.CFURLRef) DADiskRef
DADiskCreateFromVolumePath creates a new disk object.
It panics if DADiskCreateFromVolumePath is unavailable at run time; use TryDADiskCreateFromVolumePath to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskCreateFromVolumePath(_:_:_:)
func TryDADiskCopyWholeDisk ¶
TryDADiskCopyWholeDisk is like DADiskCopyWholeDisk but returns an error instead of panicking if DADiskCopyWholeDisk is unavailable at run time.
func TryDADiskCreateFromBSDName ¶
func TryDADiskCreateFromBSDName(allocator corefoundation.CFAllocatorRef, session DASessionRef, name string) (DADiskRef, error)
TryDADiskCreateFromBSDName is like DADiskCreateFromBSDName but returns an error instead of panicking if DADiskCreateFromBSDName is unavailable at run time.
func TryDADiskCreateFromIOMedia ¶
func TryDADiskCreateFromIOMedia(allocator corefoundation.CFAllocatorRef, session DASessionRef, media uint32) (DADiskRef, error)
TryDADiskCreateFromIOMedia is like DADiskCreateFromIOMedia but returns an error instead of panicking if DADiskCreateFromIOMedia is unavailable at run time.
func TryDADiskCreateFromVolumePath ¶
func TryDADiskCreateFromVolumePath(allocator corefoundation.CFAllocatorRef, session DASessionRef, path corefoundation.CFURLRef) (DADiskRef, error)
TryDADiskCreateFromVolumePath is like DADiskCreateFromVolumePath but returns an error instead of panicking if DADiskCreateFromVolumePath is unavailable at run time.
type DADiskRenameCallback ¶
type DADiskRenameCallback = func(disk DADiskRef, dissenter DADissenterRef, context unsafe.Pointer)
DADiskRenameCallback is type of the callback function used by DADiskRename().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskRenameCallback
type DADiskRenameOptions ¶
type DADiskRenameOptions = uint32
DADiskRenameOptions is options for DADiskRename().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskRenameOptions
type DADiskUnmountApprovalCallback ¶
type DADiskUnmountApprovalCallback = func(disk DADiskRef, context unsafe.Pointer) DADissenterRef
DADiskUnmountApprovalCallback is type of the callback function used by DARegisterDiskUnmountApprovalCallback().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskUnmountApprovalCallback
type DADiskUnmountCallback ¶
type DADiskUnmountCallback = func(disk DADiskRef, dissenter DADissenterRef, context unsafe.Pointer)
DADiskUnmountCallback is type of the callback function used by DADiskUnmount().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskUnmountCallback
type DADiskUnmountOptions ¶
type DADiskUnmountOptions = uint32
DADiskUnmountOptions is options for DADiskUnmount().
See: https://developer.apple.com/documentation/DiskArbitration/DADiskUnmountOptions
type DADissenterRef ¶
type DADissenterRef uintptr
DADissenterRef is type of a reference to DADissenter instances.
See: https://developer.apple.com/documentation/DiskArbitration/DADissenter
func DADissenterCreate ¶
func DADissenterCreate(allocator corefoundation.CFAllocatorRef, status DAReturn, string_ corefoundation.CFStringRef) DADissenterRef
DADissenterCreate creates a new dissenter object.
It panics if DADissenterCreate is unavailable at run time; use TryDADissenterCreate to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADissenterCreate(_:_:_:)
func TryDADissenterCreate ¶
func TryDADissenterCreate(allocator corefoundation.CFAllocatorRef, status DAReturn, string_ corefoundation.CFStringRef) (DADissenterRef, error)
TryDADissenterCreate is like DADissenterCreate but returns an error instead of panicking if DADissenterCreate is unavailable at run time.
type DAReturn ¶
type DAReturn = int32
DAReturn is a return code.
See: https://developer.apple.com/documentation/DiskArbitration/DAReturn
func DADiskSetOptions ¶
func DADiskSetOptions(disk DADiskRef, options DADiskOptions, value bool) DAReturn
DADiskSetOptions sets the options for the specified disk.
It panics if DADiskSetOptions is unavailable at run time; use TryDADiskSetOptions to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADiskSetOptions(_:_:_:)
func DADissenterGetStatus ¶
func DADissenterGetStatus(dissenter DADissenterRef) DAReturn
DADissenterGetStatus obtains the return code.
It panics if DADissenterGetStatus is unavailable at run time; use TryDADissenterGetStatus to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DADissenterGetStatus(_:)
func TryDADiskSetOptions ¶
func TryDADiskSetOptions(disk DADiskRef, options DADiskOptions, value bool) (DAReturn, error)
TryDADiskSetOptions is like DADiskSetOptions but returns an error instead of panicking if DADiskSetOptions is unavailable at run time.
func TryDADissenterGetStatus ¶
func TryDADissenterGetStatus(dissenter DADissenterRef) (DAReturn, error)
TryDADissenterGetStatus is like DADissenterGetStatus but returns an error instead of panicking if DADissenterGetStatus is unavailable at run time.
type DASessionRef ¶
type DASessionRef uintptr
DASessionRef is type of a reference to DASession instances.
See: https://developer.apple.com/documentation/DiskArbitration/DASession
func DASessionCreate ¶
func DASessionCreate(allocator corefoundation.CFAllocatorRef) DASessionRef
DASessionCreate creates a new session.
It panics if DASessionCreate is unavailable at run time; use TryDASessionCreate to get an error instead.
See: https://developer.apple.com/documentation/DiskArbitration/DASessionCreate(_:)
func TryDASessionCreate ¶
func TryDASessionCreate(allocator corefoundation.CFAllocatorRef) (DASessionRef, error)
TryDASessionCreate is like DASessionCreate but returns an error instead of panicking if DASessionCreate is unavailable at run time.
type KDADiskClaimOption ¶ added in v0.5.1
type KDADiskClaimOption uint32
const (
KDADiskClaimOptionDefault KDADiskClaimOption = 0
)
func (KDADiskClaimOption) String ¶ added in v0.5.1
func (e KDADiskClaimOption) String() string
type KDADiskEjectOption ¶ added in v0.6.4
type KDADiskEjectOption uint32
const (
KDADiskEjectOptionDefault KDADiskEjectOption = 0
)
func (KDADiskEjectOption) String ¶ added in v0.6.4
func (e KDADiskEjectOption) String() string
type KDADiskMountOption ¶
type KDADiskMountOption uint32
const ( KDADiskMountOptionDefault KDADiskMountOption = 0 KDADiskMountOptionNoFollow KDADiskMountOption = 0x2 // KDADiskMountOptionWhole: Mount the volumes tied to the whole disk object. KDADiskMountOptionWhole KDADiskMountOption = 0x1 )
func (KDADiskMountOption) String ¶
func (e KDADiskMountOption) String() string
type KDADiskOption ¶ added in v0.5.1
type KDADiskOption uint32
const (
KDADiskOptionDefault KDADiskOption = 0
)
func (KDADiskOption) String ¶ added in v0.5.1
func (e KDADiskOption) String() string
type KDADiskRenameOption ¶ added in v0.5.1
type KDADiskRenameOption uint32
const (
KDADiskRenameOptionDefault KDADiskRenameOption = 0
)
func (KDADiskRenameOption) String ¶ added in v0.5.1
func (e KDADiskRenameOption) String() string
type KDADiskUnmountOption ¶
type KDADiskUnmountOption uint32
const ( KDADiskUnmountOptionDefault KDADiskUnmountOption = 0 // KDADiskUnmountOptionForce: Unmount the volume even if files are still active. KDADiskUnmountOptionForce KDADiskUnmountOption = 0x80000 // KDADiskUnmountOptionWhole: Unmount the volumes tied to the whole disk object. KDADiskUnmountOptionWhole KDADiskUnmountOption = 0x1 )
func (KDADiskUnmountOption) String ¶
func (e KDADiskUnmountOption) String() string
type KDAReturn ¶
type KDAReturn int32
const ( KDAReturnBadArgument KDAReturn = -119930877 KDAReturnBusy KDAReturn = -119930878 KDAReturnError KDAReturn = -119930879 KDAReturnExclusiveAccess KDAReturn = -119930876 KDAReturnNoResources KDAReturn = -119930875 KDAReturnNotFound KDAReturn = -119930874 KDAReturnNotMounted KDAReturn = -119930873 KDAReturnNotPermitted KDAReturn = -119930872 KDAReturnNotPrivileged KDAReturn = -119930871 KDAReturnNotReady KDAReturn = -119930870 KDAReturnNotWritable KDAReturn = -119930869 KDAReturnSuccess KDAReturn = 0 KDAReturnUnsupported KDAReturn = -119930868 )