Skip to content

Instantly share code, notes, and snippets.

@edenwaith
Last active October 10, 2019 21:49
Show Gist options
  • Save edenwaith/9b33103a0aa4aab63b7dee9f73fe49a3 to your computer and use it in GitHub Desktop.
Save edenwaith/9b33103a0aa4aab63b7dee9f73fe49a3 to your computer and use it in GitHub Desktop.
Get the available free space on the root drive using the method volumeFreeSpaceForDisk from the private framework DiskManagement
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#pragma mark Blocks
typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown
#pragma mark Named Structures
struct DMUDSPrivRec {
unsigned long long signature_LE64;
char bsd[150];
};
#pragma mark -
//
// File: DiskManagement
// UUID: AF69177A-D254-39B1-A2BE-8573D2391AE2
//
// Arch: x86_64
// Current version: 1.0.0
// Compatibility version: 1.0.0
// Source version: 1315.0.0.0.0
// Minimum Mac OS X version: 10.13.0
// SDK version: 10.13.0
//
// Objective-C Garbage Collection: Unsupported
//
@protocol NSCoding
- (id)initWithCoder:(NSCoder *)arg1;
- (void)encodeWithCoder:(NSCoder *)arg1;
@end
@protocol NSSecureCoding <NSCoding>
+ (BOOL)supportsSecureCoding;
@end
__attribute__((visibility("hidden")))
@interface _DMListDA : NSObject
{
double _givenTimeout;
struct __DASession *_givenDASession;
BOOL _currentDAIdle;
NSMutableArray *_currentList;
NSString *_searchKey;
id _searchValue;
BOOL _didItOnce;
}
+ (BOOL)waitForDAIdleWithDASession:(struct __DASession *)arg1 timeout:(double)arg2;
+ (struct __DADisk *)waitAndCopyDiskForBSD:(id)arg1 daSession:(struct __DASession *)arg2 timeout:(double)arg3 preWait:(double)arg4;
- (BOOL)anticipatingMoreDisks;
- (id)copyCurrentDisks;
- (struct __DADisk *)copyCurrentDiskForKey:(id)arg1 value:(id)arg2;
- (void)doBlockingSearch;
- (void)dealloc;
- (id)initWithSession:(struct __DASession *)arg1 timeout:(double)arg2;
@end
__attribute__((visibility("hidden")))
@interface _DMClaimDA : NSObject
{
struct __DASession *_givenDASession;
}
- (int)stopClaiming;
- (int)startClaimingMountable;
- (int)startClaimingUnrecognized;
- (void)dealloc;
- (id)initWithSession:(struct __DASession *)arg1;
@end
__attribute__((visibility("hidden")))
@interface _DMWaitIdleDA : NSObject
{
double _givenTimeout;
struct __DASession *_givenDASession;
BOOL _currentDAIdle;
}
+ (void)waitForDAIdleWithDASession:(struct __DASession *)arg1 timeout:(double)arg2 didGoIdle:(char *)arg3;
- (void)dealloc;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMUDSWrapper : NSObject <NSSecureCoding>
{
struct DMUDSPrivRec _uds;
}
+ (BOOL)supportsSecureCoding;
+ (id)wrapperWithDiskIdentifier:(id)arg1;
+ (id)wrapperFromDADisk:(struct __DADisk *)arg1;
+ (id)wrapperWithUDS:(struct DMUDSPrivRec *)arg1;
- (BOOL)isEqual:(id)arg1;
- (id)description;
- (id)vettedWholeDiskWrapper;
- (struct DMUDSPrivRec *)UDSPtr;
- (void)encodeWithCoder:(id)arg1;
- (id)initWithCoder:(id)arg1;
- (id)initWithUDS:(struct DMUDSPrivRec *)arg1;
@end
__attribute__((visibility("hidden")))
@interface DMXMLInputStream : NSObject
{
NSMutableString *_toolTextOutputAccumulator;
NSMutableString *_xmlDocAccumulator;
}
- (int)renderParameter:(id)arg1 numberFormat:(id)arg2 outString:(id *)arg3;
- (int)controlStringToFilledString:(id)arg1 parameters:(id)arg2 numberFormat:(id)arg3 outString:(id *)arg4;
- (int)linesToDictionaries:(id)arg1 dictionaryHandler:(CDUnknownBlockType)arg2;
- (int)chunksToLines:(id)arg1 lineHandler:(CDUnknownBlockType)arg2;
- (void)dealloc;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMFilesystemPrivVars : NSObject
{
NSString *_fsPersonality;
NSString *_contentMask;
NSString *_fsType;
BOOL _serverOnly;
NSString *_fsUnlocalizedName;
NSString *_fsLocalizedName;
NSString *_fsUnlocalizedEncryptionName;
NSString *_fsLocalizedEncryptionName;
NSString *_fsUnlocalizedCoreStorageEncryptionName;
NSString *_fsLocalizedCoreStorageEncryptionName;
NSString *_bundlePath;
NSDictionary *_fsDictionary;
NSNumber *_minimumSize;
NSNumber *_maximumSize;
NSString *_verifyExecutable;
NSString *_verifyArgs;
NSString *_liveVerifyArgs;
NSString *_verifyRepairOutputXMLArgs;
NSString *_repairExecutable;
NSString *_repairArgs;
NSString *_verifyRepairOutputLocale;
NSDictionary *_verifyRepairOutputLocalizationDict;
BOOL _shouldBeUserFormattable;
NSString *_formatExecutable;
NSString *_formatArgs;
BOOL _volumeNameIsCasePreserving;
BOOL _volumeNameIsCaseSensitive;
BOOL _fileObjectsAreCasePreserving;
BOOL _fileObjectsAreCaseSensitive;
}
@end
@interface DMFilesystem : NSObject
{
id _instPriv;
}
+ (BOOL)isCanonicalPersonalityNameEqual:(id)arg1 withInformalName:(id)arg2;
+ (id)filesystemForPersonality:(id)arg1;
+ (id)filesystemForIOContent:(id)arg1;
+ (id)filesystemForType:(id)arg1 considerDisk:(struct __DADisk *)arg2;
+ (id)filesystemForLocalizedName:(id)arg1;
+ (id)bootableFilesystems;
+ (id)filesystems;
+ (void)ensureDatabaseAndForceRebuild:(BOOL)arg1;
- (id)localizedVerifyRepairString:(id)arg1 found:(char *)arg2;
- (void)setVerifyRepairStringLocale:(id)arg1;
- (id)coreStorageEncryptedUserVisibleName;
- (id)unlocalizedCoreStorageEncryptedUserVisibleName;
- (id)encryptedUserVisibleName;
- (id)unlocalizedEncryptedUserVisibleName;
- (BOOL)supportedByAPFS;
- (BOOL)supportedByCoreStorage;
- (BOOL)supportedAsFullyFeaturedMacOSHFS;
- (BOOL)supportedAsFullyFeaturedMacOS;
- (BOOL)supportedByWindows;
- (BOOL)supportsResize;
- (BOOL)supportsLiveVerify;
- (BOOL)supportsJournaling;
- (BOOL)canHavePermissionsOff;
- (BOOL)bootable;
- (BOOL)requiresWholeDiskFormat;
- (BOOL)requiresBooterToBoot;
- (BOOL)canFormatWholeDisk;
- (id)maximumSize;
- (id)minimumSize;
- (BOOL)canBeFormatted;
- (id)formatArguments;
- (id)formatExecutable;
- (BOOL)canBeRepaired;
- (id)repairArguments;
- (id)repairExecutable;
- (BOOL)canBeVerified;
- (BOOL)supportsXMLVerifies;
- (BOOL)supportsPercentageVerifies;
- (id)verifyRepairOutputXMLArguments;
- (id)percentageVerifyArguments;
- (id)liveVerifyArguments;
- (id)verifyArguments;
- (id)verifyExecutable;
- (id)contentMask;
- (id)bundlePath;
- (BOOL)fileObjectsAreCaseSensitive;
- (BOOL)fileObjectsAreCasePreserving;
- (BOOL)volumeNameIsCaseSensitive;
- (BOOL)volumeNameIsCasePreserving;
- (void)hardcodedAttribute:(const char *)arg1 available:(char *)arg2 datum:(unsigned long long *)arg3;
- (id)correctedVolumeNameForName:(id)arg1;
- (BOOL)isValidName:(id)arg1 correctedName:(id *)arg2;
- (BOOL)isValidName:(id)arg1;
- (void)awareNameSanitizer:(id)arg1 allowToUpper:(BOOL)arg2 allowReplace:(BOOL)arg3 isValid:(char *)arg4 correctedName:(id *)arg5;
- (BOOL)nameSanitizer:(id)arg1 correctedName:(id *)arg2 doToUpper:(BOOL)arg3 illegalChars:(id)arg4 replacementChar:(id)arg5 leadingDotOK:(BOOL)arg6 controlCharsOK:(BOOL)arg7 minChars:(unsigned int)arg8 maxChars:(unsigned int)arg9 maxBytes:(unsigned int)arg10 limitEncoding:(unsigned long long)arg11;
- (BOOL)serverOnly;
- (BOOL)shouldBeUserFormattable;
- (id)filesystemDictionary;
- (id)userVisibleNameForLanguage:(id)arg1;
- (id)userVisibleName;
- (id)unlocalizedUserVisibleName;
- (id)filesystemType;
- (id)filesystemPersonality;
- (BOOL)isEqual:(id)arg1;
- (id)description;
- (void)dealloc;
- (id)initWithPersonality:(id)arg1 majorType:(id)arg2 localizedUserVisibleName:(id)arg3 localizedUserVisibleCoreStorageEncryptionName:(id)arg4 personalityDict:(id)arg5 bundlePath:(id)arg6;
@end
__attribute__((visibility("hidden")))
@interface DMManagerPrivVars : NSObject
{
struct __DASession *_clientDefaultDASession;
id _clientDelegate;
unsigned int _clientThread;
unsigned int _bootstrap_MachPort;
char _sessionUUID[40];
unsigned int _f2t_MachPort;
unsigned int _t2f_MachPort;
struct {
unsigned int _field1;
unsigned int _field2;
unsigned int _field3;
unsigned int _field4;
unsigned int _field5;
int _field6;
} *_msgReplyArea;
struct __CFMachPort *_t2f_CFMachPort;
struct AuthorizationOpaqueRef *_implicitAuthorization;
struct AuthorizationOpaqueRef *_explicitAuthorization;
NSLocale *_locale;
}
@end
@interface DMManager : NSObject
{
id _instPriv;
}
+ (id)sharedManagerForThread;
+ (id)sharedManager;
+ (BOOL)systemResourcesSufficient;
+ (void)initialize;
- (void)dealloc;
- (void)done;
- (int)setUserID:(id)arg1 groupID:(id)arg2;
- (void)setLanguage:(id)arg1;
- (const struct AuthorizationOpaqueRef *)authorization;
- (void)setAuthorization:(const struct AuthorizationOpaqueRef *)arg1;
- (id)delegate;
- (void)setDelegate:(id)arg1;
- (struct __DASession *)defaultDASession;
- (void)setDefaultDASession:(struct __DASession *)arg1;
- (id)init;
- (struct __DASession *)obtainedClientDASession:(struct __DADisk *)arg1;
- (void)getSessionUUID:(char *)arg1 f2tPort:(unsigned int *)arg2 t2fPort:(unsigned int *)arg3 clientDefaultDASession:(struct __DASession **)arg4;
- (void)stopInstanceAsNeeded;
- (BOOL)clientConforms:(id)arg1 error:(int *)arg2;
- (BOOL)checkClientDelegate;
- (void)setClientDelegate:(id)arg1;
- (BOOL)isAPFSVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAPFSPhysicalStoreDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAPFSContainerSchemeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAPFSContainerReferenceDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)coreStorageStatusSummaryForDisk:(struct __DADisk *)arg1 orForCSUUID:(id)arg2 error:(int *)arg3;
- (BOOL)isDisallowedCoreStorageOperationsForLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)needsRebootToBeginCoreStorageConversion:(struct __DADisk *)arg1 checkRoot:(BOOL)arg2 error:(int *)arg3;
- (BOOL)isUnrecognizedCoreStoragePhysicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isCoreStoragePhysicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)optimizationProgressForCoreStorageDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)optimizationProgressForLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)optimizationProgressForLogicalVolume:(id)arg1 error:(int *)arg2;
- (id)conversionProgressForCoreStorageDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)conversionProgressForLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)conversionProgressForLogicalVolume:(id)arg1 error:(int *)arg2;
- (id)conversionStateForLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isCoreStorageCompositeLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isCoreStorageEncryptedLogicalVolumeDisk:(struct __DADisk *)arg1 locked:(char *)arg2 type:(id *)arg3 error:(int *)arg4;
- (BOOL)isCoreStorageLogicalVolumeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)DMAppleRAIDMemberRebuildProgress:(id)arg1 error:(int *)arg2;
- (id)DMAppleRAIDParentUUIDForUUID:(id)arg1 error:(int *)arg2;
- (BOOL)isAppleRAIDSpareDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAppleRAIDMemberDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAppleRAIDSetDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAppleRAIDDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAppleRAIDUUID:(id)arg1 error:(int *)arg2;
- (struct __DADisk *)DMAppleRAIDUUIDLookup:(id)arg1;
- (id)DMAppleRAIDUUIDForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)physicalDisksForDisk:(struct __DADisk *)arg1 storageSystemName:(id *)arg2 error:(int *)arg3;
- (BOOL)isMountableVolume:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)ioContentOfDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)ioContentToHuman:(id)arg1 error:(int *)arg2;
- (id)ioContentToHuman:(id)arg1 context:(id)arg2 error:(int *)arg3;
- (BOOL)canRepairPermissions:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)permissionsEnabledForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyRecoveryDiskForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyBooterDiskForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isRecoveryDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isBooterDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isRecoveryBooterPartitionDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isBooterPartitionDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isLiveResizablePartitionForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isOpenDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isLeafDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isJournaledDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isVirtualWholeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isRemovableMediaOrExternalDeviceDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isEjectableDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isRemovableDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isInternalDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isNetworkDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isUserDataVolume:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isSystemImage:(struct __DADisk *)arg1 error:(int *)arg2;
- (int)partitionMapSchemeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)wholeDiskSupportsLowLevelFormat:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)wholeDiskHasOS9Drivers:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)smartStatusForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)busSpecificKeysForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isSolidStateDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)protocolForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isXsanFilesystemDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isXsanComponentDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isIPodDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)mediaTypeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isAppleDiskImage:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)bayNameForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isErasableOpticalMedia:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)opticalMediaTypeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)opticalDeviceTypeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isDVD:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isCD:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isOpticalDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isFileCaseSensitiveDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isFileCasePreservingDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isVolumeNameCaseSensitiveDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isVolumeNameCasePreservingDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)filesystemForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isWritableVolume:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isWritableMedia:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isWritableDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)blockSizeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)totalSizeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)ioKitSizeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)volumeAllocationBlockSizeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)volumeTotalSizeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)volumeFreeSpaceForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyDiskForVolumeName:(id)arg1 error:(int *)arg2;
- (id)volumeNameForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)mountPointForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isMountedVolume:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isOnSameWholeDiskAsRoot:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isRootVolume:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)deviceTreePathForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)rawDeviceNodeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)deviceNodeForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)partitionIdentifierForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)wholeDiskIdentifierForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)diskIdentifierForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)ioKitNameForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)mediaNameForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)deviceNameForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)diskUUIDForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)volumeUUIDForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)uuidForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isPartitionDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isChildDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isWholeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)descriptionForDisk:(struct __DADisk *)arg1;
- (struct __DADisk *)copyDiskForPartitionIdentifier:(id)arg1 forWholeDisk:(struct __DADisk *)arg2 error:(int *)arg3;
- (struct __DADisk *)copyDiskForVolumeUUID:(id)arg1 error:(int *)arg2;
- (struct __DADisk *)copyDiskForDiskUUID:(id)arg1 error:(int *)arg2;
- (BOOL)mapLayoutMatching:(struct __DADisk *)arg1 matchScheme:(int)arg2 matchPartitions:(id)arg3 error:(int *)arg4;
- (BOOL)isLastDiskInMap:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)isFirstDiskInMap:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyPreviousDiskInMapForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyNextDiskInMapForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyLastDiskInMapForWholeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyFirstDiskInMapForWholeDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)copyWholeDiskForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (struct __DADisk *)wholeDiskForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)partitionChildrenForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)directChildrenForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)childrenForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (id)topLevelDisks;
- (id)disks;
- (struct __DADisk *)rootDisk:(int *)arg1;
- (struct __DADisk *)copyRootDisk:(int *)arg1;
- (struct __DADisk *)copyDiskForMountPoint:(id)arg1 error:(int *)arg2;
- (struct __DADisk *)diskForPath:(id)arg1 error:(int *)arg2;
- (struct __DADisk *)copyDiskForPath:(id)arg1 error:(int *)arg2;
- (struct __DADisk *)copyDiskForArgumentName:(id)arg1 timeout:(double)arg2 complete:(char *)arg3;
- (int)renameDisk:(struct __DADisk *)arg1 toName:(id)arg2;
- (int)renameDisk:(struct __DADisk *)arg1 toName:(id)arg2 errorDict:(id *)arg3;
- (int)unmountEFISystemPartition:(struct __DADisk *)arg1 options:(id)arg2;
- (int)mountEFISystemPartition:(struct __DADisk *)arg1 options:(id)arg2 espDisk:(struct __DADisk **)arg3 espMountPoint:(id *)arg4;
- (int)ejectDiskOnly:(struct __DADisk *)arg1 errorDict:(id *)arg2;
- (BOOL)ejectDisk:(struct __DADisk *)arg1;
- (BOOL)ejectDisk:(struct __DADisk *)arg1 errorDict:(id *)arg2;
- (int)unmountDisksDeepForPartitionMap:(struct __DADisk *)arg1 force:(BOOL)arg2 timeout:(double)arg3;
- (BOOL)unmountDisk:(struct __DADisk *)arg1 entireDisk:(BOOL)arg2 force:(BOOL)arg3;
- (BOOL)unmountDisk:(struct __DADisk *)arg1 entireDisk:(BOOL)arg2 force:(BOOL)arg3 errorDict:(id *)arg4;
- (BOOL)unmountVolumePath:(id)arg1 force:(BOOL)arg2 errorDict:(id *)arg3;
- (BOOL)mountDisk:(struct __DADisk *)arg1 entireDisk:(BOOL)arg2 atPath:(id)arg3 readOnly:(BOOL)arg4 otherArguments:(id)arg5;
- (BOOL)mountDisk:(struct __DADisk *)arg1 entireDisk:(BOOL)arg2 atPath:(id)arg3 readOnly:(BOOL)arg4 otherArguments:(id)arg5 errorDict:(id *)arg6;
- (BOOL)doMountDisk:(struct __DADisk *)arg1 atPath:(id)arg2 readOnly:(BOOL)arg3 otherArguments:(id)arg4 errorDict:(id *)arg5;
- (int)makeVolumeCaseSensitive:(struct __DADisk *)arg1;
- (int)volumeInfoForUnmountedDisk:(struct __DADisk *)arg1 info:(id *)arg2;
- (int)modifyOwnershipForDisk:(struct __DADisk *)arg1 enableOwnership:(BOOL)arg2;
- (int)modifyJournalOnDisk:(struct __DADisk *)arg1 enableJournaling:(BOOL)arg2 force:(BOOL)arg3;
- (int)moveJournalInternal:(struct __DADisk *)arg1;
- (int)upgradeDisk:(struct __DADisk *)arg1 enablePermissions:(BOOL)arg2;
- (int)findBooterDiskContainingBaseSystemForDisk:(struct __DADisk *)arg1;
- (int)makeLegacyBootable:(struct __DADisk *)arg1 partitionDataRuns:(id)arg2 MBRHeaderDataRun:(id)arg3 setActive:(unsigned char)arg4 updateBootIni:(BOOL)arg5 options:(id)arg6;
- (int)recoveryPartitionInfoForVolume:(struct __DADisk *)arg1 what:(id)arg2 info:(id *)arg3;
- (int)replaceDiagnosticsForVolume:(struct __DADisk *)arg1 diagnosticsDiskImageFile:(id)arg2 diagnosticsChunkListFile:(id)arg3 verifyImage:(BOOL)arg4 allowGrowth:(BOOL)arg5 diagnosticsMachineBlacklistInhibit:(BOOL)arg6;
- (int)ensureRecoveryPartitionForVolume:(struct __DADisk *)arg1 macOSXDiskImageFile:(id)arg2 macOSXDiskImageChunkListFile:(id)arg3 diagnosticsDiskImageFile:(id)arg4 diagnosticsDiskImageChunkListFile:(id)arg5 verifyImage:(BOOL)arg6 repairDonor:(BOOL)arg7 diagnosticsMachineBlacklistInhibit:(BOOL)arg8;
- (int)ensureRecoveryPartitionForVolume:(struct __DADisk *)arg1 macOSXDiskImageFile:(id)arg2 macOSXDiskImageChunkListFile:(id)arg3 diagnosticsDiskImageFile:(id)arg4 diagnosticsDiskImageChunkListFile:(id)arg5 verifyImage:(BOOL)arg6 repairDonor:(BOOL)arg7 bless:(BOOL)arg8;
- (int)ensureRecoveryPartitionForVolume:(struct __DADisk *)arg1 macOSXDiskImageFile:(id)arg2 macOSXDiskImageChunkListFile:(id)arg3 verifyImage:(BOOL)arg4 repairDonor:(BOOL)arg5 bless:(BOOL)arg6;
- (int)ensureRecoveryPartitionForVolume:(struct __DADisk *)arg1 macOSXDiskImageFile:(id)arg2 macOSXDiskImageChunkListFile:(id)arg3 verifyImage:(BOOL)arg4 repairDonor:(BOOL)arg5;
- (int)ensureRecoveryPartitionForVolume:(struct __DADisk *)arg1 macOSXDiskImageFile:(id)arg2 verifyImage:(BOOL)arg3 repairDonor:(BOOL)arg4;
- (int)makeBootable:(struct __DADisk *)arg1 filesystem:(id)arg2 newDisk:(struct __DADisk **)arg3;
- (int)checkAbilityToMakeBootable:(struct __DADisk *)arg1 onAnyMachine:(BOOL)arg2 atAll:(char *)arg3 yesButDestructively:(char *)arg4;
- (int)checkMacOSXBootability:(struct __DADisk *)arg1 isBootable:(char *)arg2;
- (int)checkBootabilityOnThisMachine:(struct __DADisk *)arg1 isBootable:(char *)arg2;
- (int)checkWindowsUEFIBootabilityForOpticalWholeDisk:(struct __DADisk *)arg1 isWindowsUEFIBootable:(char *)arg2 os:(id *)arg3;
- (int)checkWindowsUEFIBootabilityForNonOpticalPartition:(struct __DADisk *)arg1 isWindowsUEFIBootable:(char *)arg2 os:(id *)arg3;
- (int)checkLegacyBootabilityForNonOpticalPartition:(struct __DADisk *)arg1 isLegacyBootable:(char *)arg2 os:(id *)arg3;
- (int)checkLegacyBootabilityForNonOpticalWholeDisk:(struct __DADisk *)arg1 isLegacyBootable:(char *)arg2 os:(id *)arg3;
- (int)checkLegacyBootabilityForOpticalWholeDisk:(struct __DADisk *)arg1 isLegacyBootable:(char *)arg2 os:(id *)arg3;
- (int)checkOpticalDiscBootability:(struct __DADisk *)arg1 isBootable:(char *)arg2;
- (int)getDiskForBootPreference:(struct __DADisk **)arg1;
- (int)copyDiskForBootPreference:(struct __DADisk **)arg1;
- (int)setWindowsUEFIDiskForNextOnlyBootPreference:(struct __DADisk *)arg1 withDriveHint:(struct __DADisk *)arg2;
- (int)setWindowsInstallerUEFIDiskForNextOnlyBootPreference:(struct __DADisk *)arg1 withDriveHint:(struct __DADisk *)arg2;
- (int)setWindowsUEFIDiskForBootPreference:(struct __DADisk *)arg1 withDriveHint:(struct __DADisk *)arg2;
- (int)setLegacyDiskForNextOnlyBootPreference:(struct __DADisk *)arg1 withDriveHint:(struct __DADisk *)arg2;
- (int)setLegacyDiskForBootPreference:(struct __DADisk *)arg1 withDriveHint:(struct __DADisk *)arg2;
- (int)setDiskForBootPreference:(struct __DADisk *)arg1 atFolderLocation:(id)arg2 isOS9:(BOOL)arg3;
- (int)getNetBootPreference:(unsigned int *)arg1 withServer:(id *)arg2 forInterface:(id *)arg3;
- (int)setNextOnlyNetBootPreference:(unsigned int)arg1 withServer:(id)arg2 forInterface:(id)arg3;
- (int)setNetBootPreference:(unsigned int)arg1 withServer:(id)arg2 forInterface:(id)arg3;
- (int)setNVRAM:(id)arg1 forKey:(id)arg2;
- (int)checkUEFIWindowsBootSupport:(char *)arg1;
- (int)checkLegacyBootSupport:(char *)arg1;
- (unsigned int)supportedNetBootProtocols;
- (int)preBootEnvironment;
- (int)checkBootabilityOnThisMachine_actualsimplepartition_:(struct __DADisk *)arg1 isBootable:(char *)arg2;
- (int)checkAbilityToMakeBootable_actualsimplepartition_:(struct __DADisk *)arg1 onAnyMachine:(BOOL)arg2 atAll:(char *)arg3 yesButDestructively:(char *)arg4;
- (int)cryptoStateForDisk:(struct __DADisk *)arg1 options:(id)arg2 details:(id *)arg3;
- (int)decryptDisk:(struct __DADisk *)arg1 options:(id)arg2 details:(id *)arg3;
- (int)encryptDisk:(struct __DADisk *)arg1 user:(id)arg2 passdata:(id)arg3 hint:(id)arg4 options:(id)arg5 details:(id *)arg6;
- (int)isDiskSuitableForDecryption:(struct __DADisk *)arg1 options:(id)arg2 suitable:(char *)arg3 details:(id *)arg4;
- (int)isDiskSuitableForEncryption:(struct __DADisk *)arg1 options:(id)arg2 suitable:(char *)arg3 details:(id *)arg4;
- (int)isSuitableTransformForLOG:(struct DMUDSPrivRec *)arg1 transform:(id)arg2 suitable:(char *)arg3 plan:(id *)arg4 details:(id)arg5;
- (void)cryptoStatusForLOG:(struct DMUDSPrivRec *)arg1 inSS:(id)arg2 yesInfoEncrypted:(char *)arg3 yesInfoBusy:(char *)arg4 yesInfoDirection:(char *)arg5 yesInfoLocked:(char *)arg6 linInfoProgress:(id *)arg7;
- (int)cryptoMigrationPlanForLOG:(struct DMUDSPrivRec *)arg1 transform:(id)arg2 currentOldSS:(id *)arg3 supported:(char *)arg4 planScript:(id *)arg5 plannedNewSS:(id *)arg6 plannedChangeSS:(char *)arg7 plannedChangeLOG:(char *)arg8;
- (int)partitionMapTypeForDisk:(id)arg1;
- (id)directChildrenOfDisk:(id)arg1;
- (id)rootDisk;
- (id)diskWithIdentifier:(id)arg1;
- (void)waitForAppearanceOfDiskNodes;
@end
__attribute__((visibility("hidden")))
@interface DMPartitionDiskPrivVars : NSObject
{
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
}
@end
@interface DMPartitionDisk : NSObject
{
id _instPriv;
}
- (int)createExternalJournalOnDisk:(struct __DADisk *)arg1 forDisk:(struct __DADisk *)arg2;
- (int)changeFilesystemSizeOnDisk:(struct __DADisk *)arg1 toSize:(id)arg2 fitPartition:(BOOL)arg3;
- (int)getFreespaceFollowingPartition:(struct __DADisk *)arg1 skipBooter:(BOOL)arg2 gapSize:(id *)arg3 reserveSize:(id *)arg4 usableSize:(id *)arg5;
- (id)getPartitionStartLocationForDisk:(struct __DADisk *)arg1;
- (int)getPartitionMapSizeForWholeDisk:(struct __DADisk *)arg1 totalSize:(id *)arg2 usableSize:(id *)arg3 overheadSize:(id *)arg4;
- (int)touchPartitionMapForWholeDisk:(struct __DADisk *)arg1;
- (int)adjustMapToFitGrownWholeDisk:(struct __DADisk *)arg1;
- (int)removePartition:(struct __DADisk *)arg1 wipe:(BOOL)arg2 options:(id)arg3;
- (int)addPartitionFollowingPartition:(struct __DADisk *)arg1 newFilesystemOrContentNoFormat:(id)arg2 newName:(id)arg3 newSize:(id)arg4 options:(id)arg5;
- (int)setLabelForPartition:(struct __DADisk *)arg1 label:(id)arg2 options:(id)arg3;
- (int)mergePartitions:(id)arg1 filesystem:(id)arg2 name:(id)arg3 erase:(BOOL)arg4;
- (int)mergePartitions:(id)arg1 filesystem:(id)arg2 name:(id)arg3 erase:(BOOL)arg4 options:(id)arg5;
- (int)resizePartition:(struct __DADisk *)arg1 toBytes:(id)arg2 withNewMapEntries:(id)arg3;
- (int)resizeVolume:(struct __DADisk *)arg1 toBytes:(id)arg2 withNewMapEntries:(id)arg3;
- (int)resizeVolume:(struct __DADisk *)arg1 toBytes:(id)arg2 withNewMapEntries:(id)arg3 options:(id)arg4;
- (int)getResizeLimitsForCoreStorageLogicalVolume:(struct __DADisk *)arg1 returningInfo:(id *)arg2;
- (int)getResizeLimitsForCoreStorageLogicalVolume:(struct __DADisk *)arg1 forPhysicalVolume:(struct __DADisk *)arg2 returningInfo:(id *)arg3;
- (int)getResizeLimits:(struct __DADisk *)arg1 returningInfo:(id *)arg2;
- (int)splitPartition:(struct __DADisk *)arg1 intoNewPartitions:(id)arg2;
- (int)partitionDisk:(struct __DADisk *)arg1 withMap:(id)arg2 formatVolumes:(BOOL)arg3;
- (int)partitionDisk:(struct __DADisk *)arg1 withMap:(id)arg2 formatVolumes:(BOOL)arg3 options:(id)arg4;
- (int)defaultSchemeTypeForSingleFilesystem:(id)arg1 forWholeDisk:(struct __DADisk *)arg2;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMEraseDiskPrivVars : NSObject
{
struct __DASession *_clientDASession;
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
}
@end
@interface DMEraseDisk : NSObject
{
id _instPriv;
}
+ (id)defaultFilesystemForDisk:(struct __DADisk *)arg1;
+ (id)eraseTypesForDisk:(struct __DADisk *)arg1;
- (int)fulfillWindowsInstallerPartitionRemovalFromCurrentBootDisk;
- (int)armWindowsInstallerPartitionRemoverOnBootCampWholeDisk:(struct __DADisk *)arg1;
- (int)eraseOpticalAsync:(struct __DADisk *)arg1 quick:(BOOL)arg2 format:(BOOL)arg3;
- (int)securelyEraseFreespace:(struct __DADisk *)arg1 level:(unsigned int)arg2;
- (int)securelyEraseDisk:(struct __DADisk *)arg1 level:(unsigned int)arg2;
- (int)wipeDisk:(struct __DADisk *)arg1 level:(unsigned int)arg2 count:(unsigned long long)arg3;
- (int)wipeDisk:(struct __DADisk *)arg1 level:(unsigned int)arg2 count:(unsigned long long)arg3 force:(BOOL)arg4;
- (id)eraseDisk:(struct __DADisk *)arg1 synchronous:(BOOL)arg2 filesystem:(id)arg3 bootable:(BOOL)arg4 name:(id)arg5 doNewfs:(BOOL)arg6;
- (id)eraseDisk:(struct __DADisk *)arg1 synchronous:(BOOL)arg2 filesystem:(id)arg3 bootable:(BOOL)arg4 name:(id)arg5 doNewfs:(BOOL)arg6 doBooterCleanup:(BOOL)arg7;
- (void)cancelCurrentOperation;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMRepairDiskPrivVars : NSObject
{
struct __DASession *_clientDASession;
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
long long _verb;
}
@end
@interface DMRepairDisk : NSObject
{
id _instPriv;
}
- (int)beginRepairEFISystemPartition:(struct __DADisk *)arg1 mode:(unsigned int)arg2;
- (int)beginPartitionMapRepairForDisk:(struct __DADisk *)arg1;
- (int)beginPartitionMapVerifyForDisk:(struct __DADisk *)arg1;
- (int)beginPartitionMapVerifyOrRepairForDisk:(struct __DADisk *)arg1 repair:(BOOL)arg2;
- (BOOL)canRepairPartitionMapForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)canVerifyPartitionMapForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (int)beginStoragesystemFilesystemRepairForDisk:(struct __DADisk *)arg1;
- (int)beginStoragesystemFilesystemVerifyForDisk:(struct __DADisk *)arg1;
- (int)beginStoragesystemFilesystemVerifyOrRepairForDisk:(struct __DADisk *)arg1 repair:(BOOL)arg2;
- (BOOL)canRepairStoragesystemFilesystemForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (BOOL)canVerifyStoragesystemFilesystemForDisk:(struct __DADisk *)arg1 error:(int *)arg2;
- (int)beginResetUserPermissionsForDisk:(struct __DADisk *)arg1 forUID:(long long)arg2 level:(long long)arg3;
- (id)userAccountsForDisk:(struct __DADisk *)arg1 getError:(int *)arg2;
@property BOOL kextcacheEnabled;
- (void)cancelCurrentOperation;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMAPFSPrivVars : NSObject
{
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
}
@end
@interface DMAPFS : NSObject
{
id _instPriv;
}
- (int)isNoBrowseRoleVolume:(struct __DADisk *)arg1 shouldNotBrowse:(char *)arg2;
- (int)isVMVolume:(struct __DADisk *)arg1 vmRole:(char *)arg2;
- (int)isRecoveryVolume:(struct __DADisk *)arg1 recoveryRole:(char *)arg2;
- (int)isSystemVolume:(struct __DADisk *)arg1 systemRole:(char *)arg2;
- (int)isUserVolume:(struct __DADisk *)arg1 userRole:(char *)arg2;
- (int)isPrebootVolume:(struct __DADisk *)arg1 prebootRole:(char *)arg2;
- (int)capacityQuotaForVolume:(struct __DADisk *)arg1 quotaOrNull:(id *)arg2;
- (int)capacityReserveForVolume:(struct __DADisk *)arg1 reserveOrNull:(id *)arg2;
- (int)rawCapacityInUseForVolume:(struct __DADisk *)arg1 used:(id *)arg2;
- (int)capacityInUseForVolume:(struct __DADisk *)arg1 used:(id *)arg2;
- (int)isFusionContainer:(struct __DADisk *)arg1 fusion:(char *)arg2;
- (int)capacityFreeForContainer:(struct __DADisk *)arg1 free:(id *)arg2;
- (int)capacityCeilingForContainer:(struct __DADisk *)arg1 size:(id *)arg2;
- (int)volumeForVolumeUUID:(id)arg1 volume:(struct __DADisk **)arg2;
- (int)volumeUUIDForVolume:(struct __DADisk *)arg1 UUID:(id *)arg2;
- (int)physicalStoreForPhysicalStoreUUID:(id)arg1 physicalStore:(struct __DADisk **)arg2;
- (int)physicalStoreUUIDForPhysicalStore:(struct __DADisk *)arg1 UUID:(id *)arg2;
- (int)containerForContainerUUID:(id)arg1 container:(struct __DADisk **)arg2;
- (int)containerUUIDForContainer:(struct __DADisk *)arg1 UUID:(id *)arg2;
- (int)snapshotForMountPoint:(id)arg1 id:(id *)arg2 name:(id *)arg3 volume:(struct __DADisk **)arg4 container:(struct __DADisk **)arg5;
- (int)containerForVolume:(struct __DADisk *)arg1 container:(struct __DADisk **)arg2;
- (int)containerForPhysicalStore:(struct __DADisk *)arg1 container:(struct __DADisk **)arg2;
- (int)mountPointForSnapshot:(id)arg1 forVolume:(struct __DADisk *)arg2 mountPoint:(id *)arg3;
- (int)snapshotsForVolume:(struct __DADisk *)arg1 ids:(id *)arg2 names:(id *)arg3;
- (int)containerSchemeDiskForContainer:(struct __DADisk *)arg1 schemeDisk:(struct __DADisk **)arg2;
- (int)volumesForContainer:(struct __DADisk *)arg1 volumes:(id *)arg2;
- (int)designatedPhysicalStoreForContainer:(struct __DADisk *)arg1 designatedPhysicalStore:(struct __DADisk **)arg2;
- (int)physicalStoresForContainer:(struct __DADisk *)arg1 physicalStores:(id *)arg2;
- (int)containers:(id *)arg1;
- (int)prebootInfoForLockedOrUnlockedVolume:(struct __DADisk *)arg1 user:(id)arg2 info:(id *)arg3 options:(id)arg4;
- (int)macOSUserForCryptoUserForVolume:(struct __DADisk *)arg1 cryptoUser:(id)arg2 macOSUserGUID:(id *)arg3 options:(id)arg4;
- (int)cryptoUserForMacOSUserForVolume:(struct __DADisk *)arg1 macOSUser:(id)arg2 apfsCryptoUser:(id *)arg3 options:(id)arg4;
- (int)dataRecordForVolume:(struct __DADisk *)arg1 user:(id)arg2 data:(id *)arg3 options:(id)arg4;
- (int)cryptoMigrationTimeForVolume:(struct __DADisk *)arg1 timeRemaining:(double *)arg2;
- (int)cryptoMigrationProgressForVolume:(struct __DADisk *)arg1 percentComplete:(id *)arg2;
- (int)cryptoMigrationStateForVolume:(struct __DADisk *)arg1 type:(unsigned char *)arg2 state:(unsigned char *)arg3 pausedState:(unsigned char *)arg4;
- (int)isCryptoMigratingForVolume:(struct __DADisk *)arg1 migrating:(char *)arg2 encrypting:(char *)arg3;
- (int)isEncryptedVolumeLocked:(struct __DADisk *)arg1 locked:(char *)arg2;
- (int)isEncryptedVolume:(struct __DADisk *)arg1 encrypted:(char *)arg2;
- (int)cryptoUserPassdataHintForVolume:(struct __DADisk *)arg1 user:(id)arg2 hintMessage:(id *)arg3;
- (int)verifyCryptoUserPassdataForVolume:(struct __DADisk *)arg1 user:(id)arg2 passdata:(id)arg3 success:(char *)arg4;
- (int)cryptoUsersForVolume:(struct __DADisk *)arg1 users:(id *)arg2;
- (int)hasCryptoUserForVolume:(struct __DADisk *)arg1 user:(id)arg2 hasUser:(char *)arg3;
- (int)updatePrebootForVolume:(struct __DADisk *)arg1 options:(id)arg2;
- (int)updatePrebootForVolumeFire:(struct __DADisk *)arg1 completion:(CDUnknownBlockType)arg2 options:(id)arg3;
- (int)startMigrationToDecryptedVolume:(struct __DADisk *)arg1 options:(id)arg2;
- (int)startMigrationToEncryptedVolume:(struct __DADisk *)arg1 user:(id)arg2 passdata:(id)arg3 newUserRecords:(id)arg4 options:(id)arg5;
- (int)setDataRecordForVolume:(struct __DADisk *)arg1 user:(id)arg2 data:(id)arg3 options:(id)arg4;
- (int)setCryptoUserPassdataHintForVolume:(struct __DADisk *)arg1 user:(id)arg2 hintMessage:(id)arg3 options:(id)arg4;
- (int)resetCryptoUserPassdataForVolume:(struct __DADisk *)arg1 recoveryUser:(id)arg2 recoveryUserPassdata:(id)arg3 userToReset:(id)arg4 userNewPassdata:(id)arg5 options:(id)arg6;
- (int)changeCryptoUserPassdataForVolume:(struct __DADisk *)arg1 macOS:(id)arg2 user:(id)arg3 oldPassdata:(id)arg4 newPassdata:(id)arg5 options:(id)arg6;
- (int)changeCryptoUserPassdataForVolume:(struct __DADisk *)arg1 user:(id)arg2 oldPassdata:(id)arg3 newPassdata:(id)arg4 options:(id)arg5;
- (int)deleteCryptoUserFromVolume:(struct __DADisk *)arg1 user:(id)arg2 options:(id)arg3;
- (int)addCryptoUsersToVolume:(struct __DADisk *)arg1 user:(id)arg2 passdata:(id)arg3 newUserRecords:(id)arg4 options:(id)arg5;
- (int)unlockEncryptedVolume:(struct __DADisk *)arg1 diskUser:(BOOL)arg2 anyUser:(BOOL)arg3 user:(id)arg4 passphrase:(const char *)arg5 passdata:(id)arg6 options:(id)arg7;
- (int)setRoleForVolume:(struct __DADisk *)arg1 options:(id)arg2;
- (int)eraseVolume:(struct __DADisk *)arg1 newFilesystem:(id)arg2 newName:(id)arg3 options:(id)arg4;
- (int)deleteVolume:(struct __DADisk *)arg1 options:(id)arg2;
- (int)addVolumeToContainer:(struct __DADisk *)arg1 newFilesystem:(id)arg2 newName:(id)arg3 options:(id)arg4;
- (int)resizeContainer:(struct __DADisk *)arg1 newSize:(id)arg2 newMapEntries:(id)arg3 options:(id)arg4;
- (int)deleteContainer:(struct __DADisk *)arg1 reformatToNewNames:(id)arg2 options:(id)arg3;
- (int)createContainerFromDisks:(id)arg1 options:(id)arg2;
- (int)ensureRecoveryBooter:(struct __DADisk *)arg1 options:(id)arg2;
- (int)convertFromHFSDryRun:(struct __DADisk *)arg1 options:(id)arg2;
- (int)convertFromHFS:(struct __DADisk *)arg1 options:(id)arg2;
- (int)convertFromHFS:(struct __DADisk *)arg1 dryRun:(BOOL)arg2 options:(id)arg3;
- (int)isDiskSuitableForConversionFromHFS:(struct __DADisk *)arg1 suitable:(char *)arg2 why:(int *)arg3 options:(id)arg4;
- (int)institutionalRecoveryKeyBlobForVolume:(struct DMUDSPrivRec *)arg1 keychainFilePath:(id)arg2 keyBlob:(id *)arg3;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMCoreStoragePrivVars : NSObject
{
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
}
@end
@interface DMCoreStorage : NSObject
{
id _instPriv;
}
- (int)changePassphraseForLogicalVolume:(id)arg1 options:(id)arg2;
- (int)unlockLogicalVolume:(id)arg1 options:(id)arg2;
- (int)makeSparseLogicalVolumeGroup:(id)arg1 options:(id)arg2;
- (int)isDiskSuitableForDecryption:(struct __DADisk *)arg1 suitable:(char *)arg2 why:(id *)arg3 options:(id)arg4;
- (int)isDiskSuitableForEncryption:(struct __DADisk *)arg1 suitable:(char *)arg2 why:(id *)arg3 options:(id)arg4;
- (int)decryptSuitableDisk:(struct __DADisk *)arg1 options:(id)arg2;
- (int)encryptSuitableDisk:(struct __DADisk *)arg1 options:(id)arg2;
- (int)decryptLogicalVolume:(id)arg1 options:(id)arg2;
- (int)encryptLogicalVolume:(id)arg1 options:(id)arg2;
- (int)isSparseLogicalVolumeGroup:(id)arg1 sparse:(char *)arg2;
- (int)isLogicalVolumeFamilyEncrypted:(id)arg1 isFullyOrPartiallyEncrypted:(char *)arg2 isFullyEncrypted:(char *)arg3 encryptionType:(id *)arg4 isLocked:(char *)arg5;
- (int)isLogicalVolumeFamilyEncrypted:(id)arg1 isFullyOrPartiallyEncrypted:(char *)arg2 isLocked:(char *)arg3;
- (int)logicalVolumeFamilyForLogicalVolume:(id)arg1 logicalVolumeFamily:(id *)arg2;
- (int)logicalVolumeGroupForLogicalVolume:(id)arg1 logicalVolumeGroup:(id *)arg2;
- (int)logicalVolumeGroupForLogicalVolumeFamily:(id)arg1 logicalVolumeGroup:(id *)arg2;
- (int)logicalVolumeGroupForPhysicalVolume:(id)arg1 logicalVolumeGroup:(id *)arg2;
- (int)isCompositeDiskForLogicalVolume:(id)arg1 composite:(char *)arg2;
- (int)isEncryptedDiskForLogicalVolume:(id)arg1 encrypted:(char *)arg2 locked:(char *)arg3 type:(id *)arg4;
- (int)sizeForLogicalVolume:(id)arg1 size:(id *)arg2;
- (int)nameForLogicalVolume:(id)arg1 name:(id *)arg2;
- (int)nameForLogicalVolumeGroup:(id)arg1 name:(id *)arg2;
- (int)isDamagedLogicalVolumeGroup:(id)arg1 damaged:(char *)arg2 how:(id *)arg3;
- (int)freeSpaceForLogicalVolumeGroup:(id)arg1 freeSpace:(id *)arg2;
- (int)sizeForLogicalVolumeGroup:(id)arg1 size:(id *)arg2;
- (int)physicalVolumesForLogicalVolumeGroup:(id)arg1 dictionaries:(id *)arg2;
- (int)logicalVolumesForLogicalVolumeGroup:(id)arg1 dictionaries:(id *)arg2;
- (int)logicalVolumeGroups:(id *)arg1;
- (int)logicalVolumeAndLogicalVolumeGroupForDisk:(struct __DADisk *)arg1 logicalVolume:(id *)arg2 logicalVolumeGroup:(id *)arg3;
- (int)logicalVolumeForDisk:(struct __DADisk *)arg1 logicalVolume:(id *)arg2;
- (int)physicalVolumeAndLogicalVolumeGroupForDisk:(struct __DADisk *)arg1 physicalVolume:(id *)arg2 logicalVolumeGroup:(id *)arg3;
- (int)copyDiskForLogicalVolume:(id)arg1 disk:(struct __DADisk **)arg2;
- (int)copyDiskForPhysicalVolume:(id)arg1 disk:(struct __DADisk **)arg2;
- (int)renameLogicalVolumeGroup:(id)arg1 newName:(id)arg2 options:(id)arg3;
- (int)destroyLogicalVolumeGroup:(id)arg1 options:(id)arg2;
- (int)removePhysicalVolume:(id)arg1 options:(id)arg2;
- (int)isDiskLogicalVolumeWithDesignatedBootCampVolume:(struct __DADisk *)arg1 bootCamp:(char *)arg2;
- (int)designatedPhysicalVolumeForResizeLogicalAndPhysicalStackForLogicalVolume:(id)arg1 physicalVolume:(id *)arg2 disk:(struct __DADisk **)arg3;
- (int)resizeLogicalAndPhysicalStackForLogicalVolume:(id)arg1 size:(id)arg2 withNewMapEntries:(id)arg3 options:(id)arg4;
- (int)resizePhysicalVolume:(id)arg1 size:(id)arg2 withNewMapEntries:(id)arg3 options:(id)arg4;
- (int)resizeLogicalVolume:(id)arg1 size:(id)arg2 options:(id)arg3;
- (int)destroyLogicalVolume:(id)arg1 options:(id)arg2;
- (int)createLogicalVolumeOnLogicalVolumeGroup:(id)arg1 fs:(id)arg2 name:(id)arg3 size:(id)arg4 options:(id)arg5;
- (int)addPhysicalVolumeDisk:(struct __DADisk *)arg1 toLogicalVolumeGroup:(id)arg2;
- (int)createLogicalVolumeGroup:(id)arg1 withDisks:(id)arg2 options:(id)arg3;
- (int)finishRevertVolume:(id)arg1;
- (int)revertVolume:(id)arg1 options:(id)arg2;
- (int)convertDisk:(struct __DADisk *)arg1 options:(id)arg2;
- (int)encodeReserveKekAuthRefIfAnyInDMCoreStorageOptions:(id)arg1;
- (int)checkNotUsedOrExportedByCoreStorage:(struct DMUDSPrivRec *)arg1;
- (int)checkPartitionScheme:(struct DMUDSPrivRec *)arg1;
- (int)isValidLVUUID:(id)arg1;
- (int)isValidLVFUUID:(id)arg1;
- (int)isValidPVUUID:(id)arg1;
- (int)isValidLVGUUID:(id)arg1;
- (int)doCallDaemonForCoreStorage:(id)arg1 inputDict:(id)arg2 outputDict:(id *)arg3 checkDelegate:(BOOL)arg4 sync:(BOOL)arg5;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
__attribute__((visibility("hidden")))
@interface DMAppleRAIDPrivVars : NSObject
{
DMManager *_dmManager;
char _sessionUUID[40];
unsigned int _sessionF2Tport;
unsigned int _sessionT2Fport;
}
@end
@interface DMAppleRAID : NSObject
{
id _instPriv;
}
- (int)updateRAIDSetParameters:(struct __DADisk *)arg1 setKey:(id)arg2 value:(id)arg3;
- (int)repairRAIDSet:(struct __DADisk *)arg1 newDisk:(struct __DADisk *)arg2;
- (int)repairRAIDSetUUID:(id)arg1 newDisk:(struct __DADisk *)arg2;
- (int)removeFromRAIDSetUUID:(id)arg1 memberUUID:(id)arg2;
- (int)removeFromRAIDSet:(struct __DADisk *)arg1 disk:(struct __DADisk *)arg2;
- (int)deleteRAIDSet:(struct __DADisk *)arg1;
- (int)deleteRAIDSetUUID:(id)arg1;
- (int)addToRAIDSet:(struct __DADisk *)arg1 newDisk:(struct __DADisk *)arg2 type:(id)arg3;
- (int)addToRAIDSetUUID:(id)arg1 newDisk:(struct __DADisk *)arg2 type:(id)arg3;
- (int)enableRAIDSetWithDisk:(struct __DADisk *)arg1 setType:(id)arg2 options:(id)arg3;
- (int)createRAIDSetWithDisks:(id)arg1 setType:(id)arg2 name:(id)arg3 format:(id)arg4 options:(id)arg5;
- (id)childrenOfRAID:(struct __DADisk *)arg1;
- (id)directRAIDLevelForSetUUID:(id)arg1;
- (id)directRAIDLevelForSet:(struct __DADisk *)arg1;
- (BOOL)isRAIDMember:(struct __DADisk *)arg1;
- (BOOL)isRAIDSet:(struct __DADisk *)arg1;
- (id)raidMembers:(id)arg1 returnMembers:(BOOL)arg2 returnSpares:(BOOL)arg3 master:(id *)arg4;
- (struct __DADisk *)UUIDToDADisk:(id)arg1;
- (id)DADiskToUUID:(struct __DADisk *)arg1;
- (id)DADiskToUUID:(struct __DADisk *)arg1 lookupMembers:(BOOL)arg2 lookupSpares:(BOOL)arg3;
- (void)dealloc;
- (id)initWithManager:(id)arg1;
- (id)init;
@end
@interface DMDisk : NSObject
{
NSString *_bsd;
NSString *_vol;
NSString *_mnt;
}
- (BOOL)isRAIDMaster;
- (BOOL)isRAIDSpare;
- (BOOL)isRAIDSlice;
- (id)wholeDiskName;
- (id)description;
- (void)dealloc;
- (id)initWithBSD:(id)arg1 VOL:(id)arg2 MNT:(id)arg3;
@end
/* dmfreespace.m
*
* Description: Get the available free space on the root drive using the method
* volumeFreeSpaceForDisk from the private framework DiskManagement
*
* Original reference: https://stackoverflow.com/a/20679389/955122
* To compile: clang -g dmfreespace.m -F/System/Library/PrivateFrameworks/ -framework Foundation -framework DiskArbitration -framework DiskManagement -o dmfreespace
* To generate the DiskManagement.h file: class-dump /System/Library/PrivateFrameworks/DiskManagement.framework/Versions/Current/DiskManagement > DiskManagement.h
* Download class-dump from Steve Nygard's website: http://stevenygard.com/projects/class-dump/
*/
#import <Foundation/Foundation.h>
#import "DiskManagement.h"
#import <DiskArbitration/DADisk.h>
// For statfs
#include <sys/param.h>
#include <sys/mount.h>
int main(int argc, char *argv[])
{
int err = 0;
const char * bsdName;
DASessionRef session;
DADiskRef disk;
CFDictionaryRef descDict;
NSString * . rootPath = @"/";
session = NULL;
disk = NULL;
descDict = NULL;
// Get the BSD name for the given path
struct statfs devStats;
statfs([rootPath UTF8String], &devStats);
bsdName = devStats.f_mntfromname;
NSLog(@"bsdName: %s", bsdName);
if (err == 0) {session = DASessionCreate(NULL); if (session == NULL) {err = EINVAL;}}
if (err == 0) {disk = DADiskCreateFromBSDName(NULL, session, bsdName); if (disk == NULL) {err = EINVAL;}}
if (err == 0) {descDict = DADiskCopyDescription(disk); if (descDict == NULL) {err = EINVAL;}}
DMManager *dmMan = [DMManager sharedManager];
NSLog(@"blockSizeForDisk: %@", [dmMan blockSizeForDisk:disk error:nil]);
NSLog(@"totalSizeForDisk: %@", [dmMan totalSizeForDisk:disk error:nil]);
NSLog(@"volumeTotalSizeForDisk: %@", [dmMan volumeTotalSizeForDisk:disk error:nil]);
NSLog(@"volumeFreeSpaceForDisk: %@", [dmMan volumeFreeSpaceForDisk:disk error:nil]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment