Skip to content

FSKit macOS xcode16.1 b2

Alex Soto edited this page Sep 18, 2024 · 1 revision

#FSKit.framework

diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSClient.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSClient.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSClient.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSClient.h	2024-09-02 23:55:04
@@ -0,0 +1,30 @@
+//
+//  Copyright (c) 2022 Apple Inc. All rights reserved.
+//
+//  FSClient.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSModuleIdentity.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/** Client class for talking to `fskitd` and asking about installed extensions */
+FSKIT_API_AVAILABILITY_V1
+@interface FSClient : NSObject
+
+/**
+ @method fetchInstalledExtensionsWithCompletionHandler: asynchronous call that calls the completion handler with a list of installed filesystem modules in the system
+ */
++(void)fetchInstalledExtensionsWithCompletionHandler:(void(^)(NSArray<FSModuleIdentity *> *_Nullable,
+                                                              NSError *_Nullable))completionHandler FSKIT_API_AVAILABILITY_V1 NS_SWIFT_NAME(installedExtensions(completionHandler:));
+
+/**
+@method installedExtensionsWithError: synchronous version fetchInstalledExtensionsWithCompletionHandler
+ */
++(NSArray<FSModuleIdentity *> * _Nullable)installedExtensionsWithError:(NSError**)error FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSContainer.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSContainer.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSContainer.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSContainer.h	2024-09-02 23:55:04
@@ -0,0 +1,67 @@
+//
+//  Copyright (c) 2022-2023 Apple Inc. All rights reserved.
+//
+//  FSContainer.h
+//  FSKit
+//
+
+//
+//  Common container-level protocols used by both Full-control and Unary Volume
+//  modules. The container-level operations needed to ADD support for either
+//  FSBlockDeviceResource or FSServerURLResource resources is the same for both
+//  module types. Those operations are defined here.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <FSKit/FSKitDefines.h>
+#import <FSKit/FSEntityIdentifier.h>
+#import <FSKit/FSResource.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @enum FSContainerState
+ * @brief State values for container state engine
+ * @description Containers start in the FSContainerNotReady state
+ * @constant FSContainerNotReady Container is not ready, errorState reports main issue
+ * @constant FSContainerBlocked Container prevented from transitioning to FSContainerReady due to error noted in errorState
+ * @constant FSContainerReady Container is ready to perform operations
+ * @constant FSContainerActive Container is active. Filesystem modification enabled
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ENUM(NSInteger, FSContainerState) {
+    // Container not ready
+    FSContainerStateNotReady = 0,
+    /*
+     Container prevented from transitioning from FSContainerNotReady to
+     FSContainerReady by a conceptually recoverable error. That error
+     which set in the errorState property
+     */
+    FSContainerStateBlocked,
+    // Container ready but inactive
+    FSContainerStateReady,
+    // Container active, one or more volumes are active
+    FSContainerStateActive
+};
+
+/** 
+ * @typedef FSContainerIdentifier
+ * @abstract Type identifying a container. Either a UUID or a UUID with additional differentiating bytes
+ * @discussion The identifier is a UUID at minimum. Some network protocols evaluate access based on
+ * the user ID given when connecting. Thus, if a computer connects to the same file server under two different user IDs, the
+ * computer is given two different item hierarchies. For such filesystems, the container identifier should be the UUID associated with
+ * the server followed by either 4 or 8 bytes of data to differentiate different connections
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSContainerIdentifier : FSEntityIdentifier
+
+/*
+ * For Unary filesystems, the container identifier is the same
+ * as the volume identifier.
+ */
+@property (readonly)    FSVolumeIdentifier *volumeIdentifier;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSEntityIdentifier.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSEntityIdentifier.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSEntityIdentifier.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSEntityIdentifier.h	2024-09-02 23:55:05
@@ -0,0 +1,47 @@
+//
+//  Copyright (c) 2024 Apple Inc.  All rights reserved.
+//
+//  FSEntityIdentifier.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface FSEntityIdentifier : NSObject <NSCopying, NSSecureCoding>
+
+- (instancetype)init;   // Generates a random UUID as the identifier
+
+- (instancetype)initWithUUID:(NSUUID *)uuid;
+- (instancetype)initWithUUID:(NSUUID *)uuid
+                        data:(NSData *)qualifier;
+- (instancetype)initWithUUID:(NSUUID *)uuid
+               byteQualifier:(const char * _Nonnull)bytes;
+- (instancetype)initWithUUID:(NSUUID *)uuid
+           longByteQualifier:(const char * _Nonnull)bytes;
+
++ (instancetype)identifier; // Generates a random UUID as the identifier
++ (instancetype)identifierWithUUID:(NSUUID *)uuid;
++ (instancetype)identifierWithUUID:(NSUUID *)uuid
+                              data:(NSData *)qualifier;
++ (instancetype)identifierWithUUID:(NSUUID *)uuid
+                     byteQualifier:(const char * _Nonnull)bytes;
++ (instancetype)identifierWithUUID:(NSUUID *)uuid
+                 longByteQualifier:(const char * _Nonnull)bytes;
+
+@property (retain)              NSUUID  *uuid;
+@property (retain, nullable)    NSData  *qualifier;
+
+@end
+
+@class FSContainerIdentifier;
+@class FSVolumeIdentifier;
+
+@interface NSUUID (FSEntityIdentifier)
+@property (copy, readonly)    FSContainerIdentifier *  fs_containerIdentifier;
+@property (copy, readonly)    FSEntityIdentifier    *  fs_entityIdentifier;
+@property (copy, readonly)    FSVolumeIdentifier    *  fs_volumeIdentifier;
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileName.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileName.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileName.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileName.h	2024-09-02 23:55:05
@@ -0,0 +1,77 @@
+//
+//  FSFileName.h
+//  FSKit
+//
+//
+
+#import <FSKit/FSKitDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ @abstract FSFileName holds file names which may or may not be valid Unicode character sequences
+ @discussion FSKit uses FSFileName as the class to carry file names from the kernel to FSModules, and to carry
+  names back to the kernel as part of directory enumeration. In almost all cases, these names will be valid
+  UTF-8 sequences. There are only two cases in which an FSModule will receive an FSFileName object whose
+  contents are not valid UTF8. The first is a program passing erroneous data to a system call. An FSModule
+  should consider this case an error. The second case applies to a subset of FSModules. Some filesystem
+  formats consider file names to be an arbitrary "bag of bytes." These formats leave character encoding to
+  be set by the operating system. In these cases, lacking encoding information, the FSModule can only pass
+  back the names it finds on disk. The behavior of upper layers such as NSFileManager is unspecified. What
+  is required, though, is that the FSModule be able to lookup such names and use such names as the source
+  name of rename operations. The FSModule is also required to support all file names which are simple
+  derivatives of these names returned from directory enumeration. The required simple derivatives are
+  names such as those for an Apple Double file ("._Name") and editor backup file names.
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSFileName : NSObject <NSSecureCoding, NSCopying>
+
+/**
+ @property data this property will always return an NSData property containing the byte sequence of the file name.
+ */
+@property (readonly) NSData                 *data FSKIT_API_AVAILABILITY_V1;
+
+/**
+ @property string this property will return the file name as an NSString if the name is a valid UTF-8 byte sequence.
+ It will fail if the file name character sequence is not valid Unicode.
+ */
+@property (readonly, nullable) NSString     *string FSKIT_API_AVAILABILITY_V1;
+
+/**
+ @property debugdescription this property will return an NSString which is a lossy conversion of the file name
+ to an NSString. The exact details of this lossy conversion are subject to change.
+ */
+@property (readonly, copy)     NSString     *debugDescription FSKIT_API_AVAILABILITY_V1;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/**
+ @method initWithCString: initialize FSFileName with the NUL-terminated character sequence pointed to by name
+ */
+- (instancetype)initWithCString:(const char *)name FSKIT_API_AVAILABILITY_V1 NS_DESIGNATED_INITIALIZER NS_SWIFT_UNAVAILABLE("Use a data or string instead."); // NUL-terminated character sequence
+
+/**
+ @method initWithBytes:length: Initialize FSFileName with a copy of up to `length` characters of the sequence pointed to by bytes.
+         A NUL character encountered in the first `length` bytes will terminate the sequence.
+ */
+- (instancetype)initWithBytes:(const char *)bytes
+                       length:(NSUInteger)length FSKIT_API_AVAILABILITY_V1 NS_DESIGNATED_INITIALIZER NS_SWIFT_UNAVAILABLE("Use a data or string instead.");
+/**
+ @method initWithData: Initialize FSFileName with a copy of up to `name.length` characters of the sequence pointed to by name.bytes.
+         A NUL character encountered in the first `name.length` bytes will terminate the sequence.
+ */
+- (instancetype)initWithData:(NSData *)name FSKIT_API_AVAILABILITY_V1;
+/**
+ @method initWithString: Initialize FSFileName with a copy of the UTF-8 representation of the characters in `name`. In the unexpected circumstance where `name` contains a NUL character, it will termiante the character sequence.
+ */
+- (instancetype)initWithString:(NSString *)name FSKIT_API_AVAILABILITY_V1;
+
++ (instancetype)nameWithCString:(const char *)name FSKIT_API_AVAILABILITY_V1 NS_SWIFT_UNAVAILABLE("Use a data or string instead."); // NUL-terminated character sequence
++ (instancetype)nameWithBytes:(const char *)bytes
+                       length:(NSUInteger)length FSKIT_API_AVAILABILITY_V1 NS_SWIFT_UNAVAILABLE("Use a data or string instead.");
++ (instancetype)nameWithData:(NSData *)name FSKIT_API_AVAILABILITY_V1;
++ (instancetype)nameWithString:(NSString *)name FSKIT_API_AVAILABILITY_V1 ;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystem.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystem.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystem.h	2024-09-02 23:55:04
@@ -0,0 +1,22 @@
+//
+//  Copyright (c) 2022-2023 Apple Inc. All rights reserved.
+//
+//  FSFileSystem.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSFileSystemBase.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @class FSFileSystem
+ * @abstract base class for a "Full-feature" module
+ */
+FSKIT_API_UNAVAILABLE_V1
+@interface FSFileSystem : NSObject <FSFileSystemBase>
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystemBase.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystemBase.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystemBase.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSFileSystemBase.h	2024-09-02 23:55:05
@@ -0,0 +1,56 @@
+//
+//  Copyright (c) 2023 Apple Inc.  All rights reserved.
+//
+//  FSFileSystemBase.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKitDefines.h>
+#import <FSKit/FSVolume.h>
+#import <FSKit/FSContainer.h>
+
+@class FSBlockDeviceResource;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ FSFileSystemBase - functionality supplied by FSKit to filesystem implementations
+ */
+FSKIT_API_AVAILABILITY_V1
+@protocol FSFileSystemBase <NSObject>
+
+// Is there an overall error on the container, such as it needs authenticating?
+@property (strong, nullable)    NSError            *errorState FSKIT_API_AVAILABILITY_V1;
+
+@property                       FSContainerState    containerState FSKIT_API_AVAILABILITY_V1;
+
+/**
+ @method wipeResource:includingRanges:excludingRanges:replyHandler:
+ @brief Wipe existing filesystems on the provided resource
+ @param resource FSBlockDeviceResource to be wiped
+ @param include set of ranges to additionally clear during wipefs processing.
+ @param exclude set of ranges to NOT clear duing wipefs processing.
+ @param reply Block with end status upon completion
+ @discussion wraps wipefs functionality from libutil. That functionality is described as:
+
+ The wipefs family of functions wipe existing filesystems on a volume.  A DKIOCUNMAP ioctl is
+      sent to the device to invalidate all of its content.  Then zeroes are written to various
+      locations that are used by various filesystems to recognize their content and mount their
+      volumes.  This is usually used by the newfs_* utilities before they create new filesystems
+      on the volume, so that the existing filesystem will not be mounted accidentally after the
+      new filesystem is created.
+
+  NOTE: These routines do not overwrite all volume structures.  These routines do not securely
+      erase the previous content.  They only overwrite enough to make sure that the normal
+      utilities will no longer recognize any filesystem content.  It is possible that previous
+      filesystem content could be recovered by other means.
+ */
+-(void)wipeResource:(FSBlockDeviceResource * )resource
+    includingRanges:(NSIndexSet *)include
+    excludingRanges:(NSIndexSet *)exclude
+  completionHandler:(void(^)(NSError * _Nullable error))reply FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSItem.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSItem.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSItem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSItem.h	2024-09-02 23:55:05
@@ -0,0 +1,115 @@
+//
+//  Copyright (c) 2022 Apple Inc. All rights reserved.
+//
+//  FSItem.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKitDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(NSInteger, FSItemAttribute) {
+    FSItemAttributeUID = 1 << 0,
+    FSItemAttributeGID = 1 << 1,
+    FSItemAttributeMode = 1 << 2,
+    FSItemAttributeType = 1 << 3,
+    FSItemAttributeLinkCount = 1 << 4,
+    FSItemAttributeFlags = 1 << 5,
+    FSItemAttributeSize = 1 << 6,
+    FSItemAttributeAllocSize = 1 << 7,
+    FSItemAttributeFileID = 1 << 8,
+    FSItemAttributeParentID = 1 << 9,
+    FSItemAttributeSupportsLimitedXAttrs = 1 << 10,
+    FSItemAttributeInhibitKOIO = 1 << 11,
+    FSItemAttributeModifyTime = 1 << 12,
+    FSItemAttributeAddedTime = 1 << 13,
+    FSItemAttributeChangeTime = 1 << 14,
+    FSItemAttributeAccessTime = 1 << 15,
+    FSItemAttributeBirthTime = 1 << 16,
+    FSItemAttributeBackupTime = 1 << 17
+};
+
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ENUM(NSInteger, FSItemType) {
+    FSItemTypeUnknown = 0,
+    FSItemTypeFile,
+    FSItemTypeDirectory,
+    FSItemTypeSymlink,
+    FSItemTypeFIFO NS_SWIFT_NAME(fifo),
+    FSItemTypeCharDevice,
+    FSItemTypeBlockDevice,
+    FSItemTypeSocket
+};
+
+FSKIT_API_AVAILABILITY_V1
+@interface FSItemAttributes : NSObject <NSSecureCoding>
+
+-(void)invalidateAllProperties;       // mark all attributes inactive
+
+@property (nonatomic)           uint32_t        uid;
+@property (nonatomic)           uint32_t        gid;
+@property (nonatomic)           uint32_t        mode;
+@property (nonatomic)           FSItemType      type;
+@property (nonatomic)           uint32_t        linkCount;
+@property (nonatomic)           uint32_t        flags;
+@property (nonatomic)           uint64_t        size;
+@property (nonatomic)           uint64_t        allocSize;
+@property (nonatomic)           uint64_t        fileID;
+@property (nonatomic)           uint64_t        parentID;
+@property (nonatomic)           BOOL            supportsLimitedXAttrs;
+/**
+ * inhibitKOIO
+ * Allows the file system to override the per file system Kernel Offloaded IO
+ * settings for a specific file.
+ */
+@property (nonatomic)           BOOL            inhibitKOIO;
+
+@property (nonatomic)           struct timespec modifyTime;
+@property (nonatomic)           struct timespec addedTime;
+@property (nonatomic)           struct timespec changeTime;
+@property (nonatomic)           struct timespec accessTime;
+@property (nonatomic)           struct timespec birthTime;
+@property (nonatomic)           struct timespec backupTime;
+
+-(BOOL)isValid:(FSItemAttribute)attribute;
+
+@end
+
+#pragma mark - Get/Set Item Attributes
+
+FSKIT_API_AVAILABILITY_V1
+@interface FSItemSetAttributesRequest : FSItemAttributes
+
+@property (nonatomic) FSItemAttribute consumedAttributes;
+
+-(BOOL)wasConsumed:(FSItemAttribute)attribute;
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+@interface FSItemGetAttributesRequest : NSObject <NSSecureCoding>
+
+@property (nonatomic) FSItemAttribute wantedAttributes;
+
+-(BOOL)isWanted:(FSItemAttribute)attribute;
+
+
+@end
+
+#pragma mark - FSItem
+FSKIT_API_AVAILABILITY_V1
+@interface FSItem : NSObject
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+@interface FSUnaryItem : FSItem
+
+@property (retain, readonly, nonatomic)  dispatch_queue_t    queue;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKit.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKit.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKit.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKit.h	2024-09-02 23:55:05
@@ -0,0 +1,42 @@
+//
+//  Copyright (c) 2022-2023 Apple Inc. All rights reserved.
+//
+//  FSKit.h
+//  FSKit
+//
+
+#ifndef FSKit_h
+#define FSKit_h
+
+#import <Foundation/Foundation.h>
+#import <os/log.h>
+
+#import <FSKit/FSKitDefines.h>
+#import <FSKit/FSKitFunctions.h>
+#import <FSKit/FSKitTypes.h>
+
+//! Project version number for FSKit.
+FOUNDATION_EXPORT double FSKitVersionNumber;
+
+//! Project version string for FSKit.
+FOUNDATION_EXPORT const unsigned char FSKitVersionString[];
+
+
+// In this header, we import all the FSKit public headers
+#import <FSKit/FSClient.h>
+#import <FSKit/FSContainer.h>
+#import <FSKit/FSEntityIdentifier.h>
+#import <FSKit/FSFileName.h>
+#import <FSKit/FSItem.h>
+#import <FSKit/FSMessageConnection.h>
+#import <FSKit/FSModuleIdentity.h>
+#import <FSKit/FSResource.h>
+#import <FSKit/FSVolume.h>
+#import <FSKit/FSVolumeExtent.h>
+
+// These two are last as they depend on classes included above
+#import <FSKit/FSFileSystemBase.h>
+#import <FSKit/FSFileSystem.h>
+#import <FSKit/FSUnaryFileSystem.h>
+
+#endif /* FSKit_h */
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitDefines.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitDefines.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitDefines.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitDefines.h	2024-09-02 23:55:05
@@ -0,0 +1,42 @@
+//
+//  Copyright (c) 2023 Apple Inc.  All rights reserved.
+//
+//  Header.h
+//  FSKit
+//
+
+#ifndef FSKitDefines_h
+#define FSKitDefines_h
+
+#ifdef __cplusplus
+# define FS_EXTERN extern "C"
+#else
+# define FS_EXTERN extern
+#endif
+
+#ifndef FS_EXPORT
+# ifndef FS_SUPPORTED_VISIBILITY
+#  if FS_UNSUPPORTED_PLATFORM
+#   define FS_SUPPORTED_VISIBILITY
+#  else
+#   define FS_SUPPORTED_VISIBILITY __attribute__((visibility("default")))
+#  endif
+# endif
+#define FS_EXPORT FS_EXTERN FS_SUPPORTED_VISIBILITY
+#endif
+
+#ifndef FS_EXPORT_INTERNAL
+#define FS_EXPORT_INTERNAL FS_EXTERN __attribute__((visibility("internal")))
+#endif
+
+#ifndef FS_ALWAYS_EXPORT
+#define FS_ALWAYS_EXPORT FS_EXTERN __attribute__((visibility("default")))
+#endif
+
+// original API
+#define FSKIT_API_AVAILABILITY_V1 API_AVAILABLE(macos(15.0)) \
+    API_UNAVAILABLE(ios, visionos) API_UNAVAILABLE(watchos, tvos)
+// Unavailable in original API
+#define FSKIT_API_UNAVAILABLE_V1 API_UNAVAILABLE(macos, ios, visionos) API_UNAVAILABLE(watchos, tvos)
+
+#endif /* FSKitDefines_h */
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitFunctions.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitFunctions.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitFunctions.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitFunctions.h	2024-09-02 23:55:05
@@ -0,0 +1,23 @@
+//
+//  Copyright (c) 2023 Apple Inc.  All rights reserved.
+//
+//  FSKitFunctions.h
+//  FSKit
+//
+
+#ifndef FSKitFunctions_h
+#define FSKitFunctions_h
+
+// C code in this header is meant to be bridged to our Swift module
+#import <Foundation/Foundation.h>
+#import <os/log.h>
+
+#import <FSKit/FSKitDefines.h>
+
+FOUNDATION_EXPORT os_log_t _Nonnull fskit_std_log(void) FSKIT_API_AVAILABILITY_V1;
+
+FOUNDATION_EXPORT NSError * _Nonnull fs_errorForPOSIXError(int) FSKIT_API_AVAILABILITY_V1;
+FOUNDATION_EXPORT NSError * _Nonnull fs_errorForMachError(int errorCode) FSKIT_API_AVAILABILITY_V1;
+FOUNDATION_EXPORT NSError * _Nonnull fs_errorForCocoaError(int errorCode) FSKIT_API_AVAILABILITY_V1;
+
+#endif /* FSKitFunctions_h */
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitTypes.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitTypes.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitTypes.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSKitTypes.h	2024-09-02 23:55:04
@@ -0,0 +1,24 @@
+//
+//  Copyright (c) 2023 Apple Inc.  All rights reserved.
+//
+//  FSKitTypes.h
+//  FSKit
+//
+
+#ifndef FSKitTypes_h
+#define FSKitTypes_h
+
+
+/*
+ * FSTaskParameters - argument array of parameters for an operation
+ *
+ *  Directly maps to `argc`/`argv` passed to a command line tool. Consists
+ * of a sequence of strings formatted as per CLI arguments. Exact squence
+ * and syntax is left to the receiver, but two examples are:
+ *
+ *  "force"     =>  @[ @"--force" ]
+ *  "read only" =>  @[ @"-o", "rdonly" ]
+ */
+typedef NSArray <NSString *> FSTaskParameters;
+
+#endif /* FSKitTypes_h */
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSMessageConnection.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSMessageConnection.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSMessageConnection.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSMessageConnection.h	2024-09-02 23:55:04
@@ -0,0 +1,36 @@
+//
+//  Copyright (c) 2022 Apple Inc. All rights reserved.
+//
+//  FSMessageConnection.h
+//  FSTaskService
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKitDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/** This class allows to pass log messages from the filesystem module to the client, and also notify the client when a task is completed.
+    FSKit will create an instance of this class for each long-running operation.
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSMessageConnection : NSObject
+
+/** @method logMessage
+    @abstract Logs given to the initiating client.
+    @param str The string to log
+ */
+- (void)logMessage:(NSString *)str FSKIT_API_AVAILABILITY_V1;
+
+/** @method didCompleteWithError
+    @abstract This informs the client that the task is completed
+    @param taskError nil or error status
+    @param completionHandler Block receiving any error stemming from delivering taskError to the client. May be nil if the caller does not need
+                        to receive a delivery error.
+ */
+- (void)didCompleteWithError:(NSError * _Nullable)taskError
+           completionHandler:(void (^)(NSError * _Nullable deliveryError))completionHandler FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSModuleIdentity.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSModuleIdentity.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSModuleIdentity.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSModuleIdentity.h	2024-09-02 23:55:05
@@ -0,0 +1,44 @@
+//
+//  Copyright (c) 2023 Apple Inc.  All rights reserved.
+//
+//  FSModuleIdentity.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKitDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NSString * FSModuleIdentityAttribute FSKIT_API_AVAILABILITY_V1 NS_TYPED_EXTENSIBLE_ENUM;
+
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeSupportsServerURLs;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeSupportsBlockResources;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeSupportsKOIO; /* Supports Kernel-offloaded I/O */
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeShortName;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeMediaTypes;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributePersonalities;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeCheckOptionSyntax;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeFormatOptionSyntax;
+FS_EXPORT FSModuleIdentityAttribute const FSModuleIdentityAttributeActivateOptionSyntax;
+
+
+/** Represents a filesystem module identity */
+FSKIT_API_AVAILABILITY_V1
+@interface FSModuleIdentity : NSObject
+
+@property (readonly) NSString   *bundleIdentifier FSKIT_API_AVAILABILITY_V1;
+
+@property (readonly) NSDictionary <FSModuleIdentityAttribute ,id>
+                                *attributes FSKIT_API_AVAILABILITY_V1;
+
+@property (readonly) NSURL      *url FSKIT_API_AVAILABILITY_V1;
+
+@property (nonatomic, getter=isEnabled, readonly)
+                     BOOL        enabled;
+@property (readonly, getter=isSystem)
+                     BOOL        system;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSResource.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSResource.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSResource.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSResource.h	2024-09-02 23:55:05
@@ -0,0 +1,343 @@
+//
+//  Copyright (c) 2022-2023 Apple Inc. All rights reserved.
+//
+//  FSResource.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSContainer.h>
+#import <FSKit/FSKitDefines.h>
+#import <FSKit/FSKitTypes.h>
+#import <FSKit/FSMessageConnection.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ENUM(NSInteger, FSMatchResult) {
+    // No match
+    FSMatchResultNotRecognized = 0,
+    // Probe recognizes this resource but is unable to use
+    FSMatchResultRecognized,
+    // Probe recognizes this resource and is ready to use, but in a limited capacity
+    FSMatchResultUsableButLimited,
+    // Probe recognizes this resource and is ready to use
+    FSMatchResultUsable,
+};
+
+/**
+ * FSResource - Abstract resource used by filesystems to contain or source the volume
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSResource : NSObject<NSSecureCoding>
+
+@property (nonatomic, readonly)     BOOL  isRevoked;
+
+// Creates a proxy object of self, if you create a proxy from a proxy, you get a copy of that proxy
+- (instancetype)makeProxy;
+
+- (void)revoke;
+
+@end
+
+#pragma mark - FSBlockDeviceResource class and helpers
+
+typedef struct {
+    off_t   offset;
+    size_t  length;
+} FSMetadataReadahead;
+
+@interface FSMetadataBlockRange : NSObject
+
+@property (readonly) off_t     startBlockOffset;
+@property (readonly) uint32_t  blockLength;
+@property (readonly) uint32_t  numberOfBlocks;
+
+-(instancetype)initWithOffset:(off_t)startBlockOffset
+                  blockLength:(uint32_t)blockLength
+               numberOfBlocks:(uint32_t)numberOfBlocks;
+
++(instancetype)rangeWithOffset:(off_t)startBlockOffset
+                   blockLength:(uint32_t)blockLength
+                numberOfBlocks:(uint32_t)numberOfBlocks;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+/**
+ * FSBlockDeviceResource - FSResource representing a disk partition
+ *
+ *      Includes both names of the partition and file descriptor
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSBlockDeviceResource : FSResource
+
++ (instancetype _Nullable)proxyResourceForBSDName:(NSString *)BSDName FSKIT_API_AVAILABILITY_V1;
+
++ (instancetype _Nullable)proxyResourceForBSDName:(NSString *)BSDName
+                                       isWritable:(BOOL)isWritable FSKIT_API_AVAILABILITY_V1;
+
+@property (readonly, copy)    NSString *        BSDName;
+@property (readonly, getter=isWritable)
+                                BOOL            writable;
+@property (readonly)            uint64_t        blockSize;
+@property (readonly)            uint64_t        blockCount;
+@property (readonly)            uint64_t        physicalBlockSize;
+@property (nonatomic, readonly, getter=isTerminated)
+                                BOOL            terminated;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+- (void)terminate FSKIT_API_AVAILABILITY_V1;
+
+/**
+ * readInto:startingAt:length:replyHandler: - read data into a buffer
+ *
+ *      This method schedules a read from the resource. The data
+ * are read from offset parameter in the file into the buffer located
+ * at buffer. Up to nbytes bytes are read. To be successful, requests
+ * must conform to the transfer requirements of the underlying resource;
+ * disk drives typically require sector addressed operations of one or
+ * more sector aligned offsets.
+ *
+ *      error will be nil in case of no error, and non-nil in case of an
+ * error. In the case of no error, actuallyRead will report the number of
+ * bytes read.
+ *
+ *      reply may be called before readInto:startingAt:length:reply returns,
+ * such as when an error is immediately detected. Otherwise it will be called
+ * when the operation concludes.
+ * Note: No assumptions should be made about reply block execution with respect to return from the function.
+ */
+-(void)readInto:(void *)buffer
+     startingAt:(off_t)offset
+         length:(size_t)length
+   replyHandler:(void(^)(size_t actuallyRead,
+                         NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousReadInto:startingAt:length:replyHandler: - synchronous read data into a buffer
+ *      This method does exactly what readInto:startingAt:length:reply: but in a synchronous way.
+ */
+-(void)synchronousReadInto:(void *)buffer
+                startingAt:(off_t)offset
+                    length:(size_t)length
+              replyHandler:(void(^)(size_t actuallyRead,
+                                    NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * writeFrom:startingAt:length:reply: - write data from a buffer
+ *
+ *      This method schedules a write to the resource. The data
+ * are written to offset parameter in the file from the buffer located
+ * at buffer. Up to nbytes bytes are read. To be successful, requests
+ * must conform to the transfer requirements of the underlying resource;
+ * disk drives typically require sector addressed operations of one or
+ * more sector aligned offsets.
+ *
+ *      error will be nil in case of no error, and non-nil in case of an
+ * error. In the case of no error, actuallyWritten will report the number of
+ * bytes written.
+ *
+ *      reply may be called before writeFrom:startingAt:length:replyHandler returns,
+ * such as when an error is immediately detected. Otherwise it will be called
+ * when the operation concludes.
+ * Note: No assumptions should be made about reply block execution with respect to return from the function.
+ */
+-(void)writeFrom:(void *)buffer
+      startingAt:(off_t)offset
+          length:(size_t)length
+    replyHandler:(void(^)(size_t actuallyWritten,
+                          NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousWriteFrom:startingAt:length:replyHandler: - synchronous write data from a buffer
+ *      This method does exactly what writeFrom:startingAt:length:reply: but in a synchronous way.
+ */
+-(void)synchronousWriteFrom:(void *)buffer
+                 startingAt:(off_t)offset
+                     length:(size_t)length
+               replyHandler:(void(^)(size_t actuallyWritten,
+                                     NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousMetadataReadInto:startingAt:length:reply: - synchronous read metadata data into a buffer
+ *
+ * This method schedules a metadata read from the resource. The data  are read from offset parameter in the file into the buffer located
+ * at buffer. Up to length bytes are read. To be successful, requests must conform to the transfer requirements of the underlying resource;
+ * disk drives typically require sector addressed operations of one or more sector aligned offsets.
+ *
+ * Error will be nil in case of no error, and non-nil in case of an error.
+ *
+ * Reply may be called before readInto:startingAt:length:reply returns, such as when an error is immediately detected.
+ * Otherwise it will be called when the operation concludes.
+ */
+-(void)synchronousMetadataReadInto:(void *)buffer
+                        startingAt:(off_t)offset
+                            length:(size_t)length
+                      replyHandler:(void(^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousMetadataReadInto:startingAt:length:readAheadExtents:readAheadCount:replyHandler: - synchronous read metadata data into a buffer with read ahead
+ */
+-(void)synchronousMetadataReadInto:(void *)buffer
+                        startingAt:(off_t)offset
+                            length:(size_t)length
+                  readAheadExtents:(const FSMetadataReadahead *)readAheadExtents
+                    readAheadCount:(NSInteger)readAheadExtentsCount
+                      replyHandler:(void(^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * metadataWriteFrom:startingAt:length:replyHandler: - write metadata data from a buffer
+ *
+ * This method schedules a  metadata write to the resource. The data are written to offset parameter in the file from the buffer located
+ * at buffer. Up to length bytes are written. To be successful, requests must conform to the transfer requirements of the underlying resource;
+ * disk drives typically require sector addressed operations of one or more sector aligned offsets.
+ *
+ * Error will be nil in case of no error, and non-nil in case of an error. In the case of no error,
+ *
+ * Reply may be called before metadataWriteFrom:startingAt:length:reply returns, such as when an error is immediately detected.
+ * Otherwise it will be called when the operation concludes.
+ * Note: No assumptions should be made about reply block execution with respect to return from the function.
+ */
+-(void)metadataWriteFrom:(void *)buffer
+              startingAt:(off_t)offset
+                  length:(size_t)length
+            replyHandler:(void(^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousMetadataWriteFrom:startingAt:length:replyHandler: - synchronous metadata write data from a buffer
+ * This method does exactly what metadataWriteFrom:startingAt:length:reply: but in a synchronous way.
+ */
+-(void)synchronousMetadataWriteFrom:(void *)buffer
+                         startingAt:(off_t)offset
+                             length:(size_t)length
+                       replyHandler:(void(^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * delayedMetadataWriteFrom:startingAt:length:replyHandler: - synchronous metadata delayed write data from a buffer
+ */
+-(void)delayedMetadataWriteFrom:(void *)buffer
+                     startingAt:(off_t)offset
+                         length:(size_t)length
+                   replyHandler:(void(^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1 NS_REFINED_FOR_SWIFT;
+
+/**
+ * synchronousMetadataFlushWithReplyHandler - synchronously flush the resource's buffer cache.
+ *
+ * This method schedules a flush to the resource. Any cached metadata operations is being written to the resource.
+ *
+ * Error will be nil in case of success, and non-nil in case of an error.
+ *
+ * Reply is called when an error is detected, or the method finishes its operation (returns).
+ */
+-(void)synchronousMetadataFlushWithReplyHandler:(void (^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1;
+
+/**
+ * synchronousMetadataClear:wait:replyHandler - synchronously clear the given ranges from our buffer cache
+ *
+ * This method clears (writes zeroes into) the given ranges in the resource's buffer cache.
+ *
+ * The 'wait' parameter indicates whether the clearing should be done using delayed writes.
+ *
+ * Error will be nil in case of success, and non-nil in case of an error.
+ *
+ * Reply is called when an error is detected, or the method finishes its operation (returns).
+ */
+-(void)synchronousMetadataClear:(NSArray<FSMetadataBlockRange *> *)rangesToClear
+                           wait:(BOOL)wait
+                   replyHandler:(void (^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1;
+
+/**
+ * synchronousMetadataClear:replyHandler - synchronously purge the given ranges from our buffer cache
+ *
+ * This method purges (removes) the given range from the resource's buffer cache.
+ *
+ * Error will be nil in case of success, and non-nil in case of an error.
+ *
+ * Reply is called when an error is detected, or the method finishes its operation (returns).
+ */
+-(void)synchronousMetadataPurge:(NSArray<FSMetadataBlockRange *> *)rangesToPurge
+                   replyHandler:(void (^)(NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+/**
+ * @brief Maintenance operations for a resource we can manage
+ *
+ * This protocol includes operations to check and possibly format a resource for an FSUnaryFilesystem.
+ * FSUnaryFilesystems for FSBlockDeviceResources must conform to this protocol, and ones for
+ * FSGenericURLResources MAY conform to thei protocol.
+ */
+FSKIT_API_AVAILABILITY_V1
+@protocol FSManageableResourceMaintenanceOperations <NSObject>
+
+@optional
+-(void)checkWithParameters:(FSTaskParameters *)parameters
+                connection:(FSMessageConnection *)connection
+                    taskID:(NSUUID *)taskID
+              replyHandler:(void (^)(NSProgress * _Nullable progress, NSError * _Nullable err))replyHandler FSKIT_API_AVAILABILITY_V1 NS_SWIFT_NAME(checkFileSystem(parameters:connection:taskID:replyHandler:));
+
+-(void)formatWithParameters:(FSTaskParameters *)parameters
+                 connection:(FSMessageConnection *)connection
+                     taskID:(NSUUID *)taskID
+               replyHandler:(void (^)(NSProgress * _Nullable progress, NSError * _Nullable err))replyHandler FSKIT_API_AVAILABILITY_V1 NS_SWIFT_NAME(formatFileSystem(parameters:connection:taskID:replyHandler:));
+
+@end
+
+/**
+ * FSGenericURLResource - FSResource representing a path
+ *
+ *      May be either a real file path (possibly security scoped URL)
+ * or an abstract path
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSGenericURLResource : FSResource
+
+@property (readonly, copy)    NSURL *         URL;
+
++(instancetype _Nullable)resourceWithURL:(NSURL *)url;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+/**
+ * @class FSProbeResult object holding result of a specific probe
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSProbeResult : NSObject <NSSecureCoding>
+
+@property (readonly)                    FSMatchResult           result;
+@property (readonly, copy, nullable)    NSString               *name;
+@property (readonly, nullable)          FSContainerIdentifier  *containerID;
+
++(instancetype _Nullable)resultWithResult:(FSMatchResult) result
+                                     name:(NSString * _Nullable)name
+                              containerID:(FSContainerIdentifier * _Nullable)containerUUID FSKIT_API_AVAILABILITY_V1;
+
+-(instancetype)init NS_UNAVAILABLE;
+
+@end
+
+/**
+ * @protocol FSBlockDeviceOperations
+ * @abstract additional operations a container must support for block devices, also optional for PathURL resources
+ */
+FSKIT_API_AVAILABILITY_V1
+@protocol FSBlockDeviceOperations <NSObject>
+
+/**
+ * @method probeResource:replyHandler: - probe a resource
+ * @param resource FSResource to be probed
+ * @param replyHandler completion block called with result
+ * @discussion Reports the result of probing the given resource.
+ */
+-(void)probeResource:(FSResource *)resource
+        replyHandler:(void(^)(FSProbeResult * _Nullable result,
+                              NSError * _Nullable error))replyHandler FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSUnaryFileSystem.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSUnaryFileSystem.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSUnaryFileSystem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSUnaryFileSystem.h	2024-09-02 23:55:05
@@ -0,0 +1,40 @@
+//
+//  Copyright (c) 2022-2023 Apple Inc. All rights reserved.
+//
+//  FSUnaryFileSystem.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ * FSUnaryFileSystem
+ *
+ *      A base class for a filesystem characterized by One Resource <=> One Volume
+ *
+ *  FSUnaryFileSystem filesystems have a life cycle more constrained than FSFileSystem
+ *  ones. The one volume and its container have a shared state and lifetime.
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSUnaryFileSystem : NSObject <FSFileSystemBase>
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+@protocol FSUnaryFileSystemOperations <NSObject>
+
+-(void)loadResource:(FSResource *)resource
+            options:(FSTaskParameters *)options
+       replyHandler:(void (^)(FSVolume * _Nullable volume,
+                              NSError * _Nullable err))reply FSKIT_API_AVAILABILITY_V1;
+
+/// This method will be called after the main runloop has started and before the first message from fskitd has been received.
+@optional
+-(void)didFinishLoading FSKIT_API_AVAILABILITY_V1;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolume.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolume.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolume.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolume.h	2024-09-02 23:55:05
@@ -0,0 +1,958 @@
+//
+//  Copyright (c) 2022 Apple Inc. All rights reserved.
+//
+//  FSVolume.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSKitDefines.h>
+#import <FSKit/FSEntityIdentifier.h>
+#import <FSKit/FSItem.h>
+#import <FSKit/FSContainer.h>
+#import <FSKit/FSFileName.h>
+#import <FSKit/FSResource.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+FSKIT_API_AVAILABILITY_V1
+typedef NSUInteger FSDirectoryCookie;
+
+FSKIT_API_AVAILABILITY_V1
+FS_EXPORT FSDirectoryCookie const FSDirectoryCookieInitial;
+
+FSKIT_API_AVAILABILITY_V1
+typedef NSUInteger FSDirectoryVerifier;
+
+FSKIT_API_AVAILABILITY_V1
+FS_EXPORT FSDirectoryVerifier const FSDirectoryVerifierInitial;
+
+/* FSVolumeErrorDomain - an error domain for FSVolume usage. */
+FSKIT_API_AVAILABILITY_V1
+FOUNDATION_EXPORT NSErrorDomain const FSVolumeErrorDomain;
+
+/* Error codes for FSVolumeErrorDomain. */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ERROR_ENUM(FSVolumeErrorDomain, FSVolumeErrorCode) {
+    FSVolumeErrorBadDirectoryCookie = 1,
+};
+
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(NSInteger, FSDeactivateOptions) {
+    FSDeactivateOptionsForce = 1 << 0
+};
+
+/*
+ * FSVolumeIdentifier - data identifying a volume
+ *
+ *      For most volumes, these data are the bytes of the UUID
+ * identifying the volume. Network filesystems may access the same
+ * underlying volume using different authentication credentials. As
+ * such, volume identifiers for those volumes add qualifying data indicative
+ * of the specific container.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.Identifier)
+@interface FSVolumeIdentifier : FSEntityIdentifier
+@end
+
+/**
+ * @typedef FSDirectoryEntryPacker
+ *  This packer block is used in the enumerateDirectory method.
+ *  Usage: Call the packer block for each directory entry you would like to return, with:
+ *      @param name item's name.
+ *      @param itemType item's type.
+ *      @param itemID item's ID.
+ *      @param nextCookie indicates the cookie value appropriate for resuming the enumeration at the next entry
+ *      @param itemAttributes item's attributes. Should be nil if no attributes were requested.
+ *      @param isLast Whether this is the last dir entry in the directory.
+ *  Return value:
+ *      @return YES if the enumeration should exit. NO if the enumeration should continue.
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef BOOL (^FSDirectoryEntryPacker)(FSFileName * name,
+                                       FSItemType itemType,
+                                       uint64_t itemID,
+                                       FSDirectoryCookie nextCookie,
+                                       FSItemAttributes * _Nullable itemAttributes,
+                                       BOOL isLast);
+
+/**
+ * @interface FSVolumeSupportedCapabilities
+ * An object to group all volume capabilities.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.SupportedCapabilities)
+@interface FSVolumeSupportedCapabilities : NSObject<NSSecureCoding>
+
+/** Supports persistent object identifiers and can look up filesystem objects by their IDs. */
+@property (nonatomic) BOOL supportsPersistentObjectIDs;
+
+/** Supports symbolic links */
+@property (nonatomic) BOOL supportsSymbolicLinks;
+
+/** Supports hard links */
+@property (nonatomic) BOOL supportsHardLinks;
+
+/** Supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash).  This does not necessarily mean the volume is actively using a journal. */
+@property (nonatomic) BOOL supportsJournal;
+
+/** Supports active journal using a journal for speedy recovery after an unplanned restart.  */
+@property (nonatomic) BOOL supportsActiveJournal;
+
+/** Does not store reliable times for the root directory */
+@property (nonatomic) BOOL doesNotSupportRootTimes;
+
+/** Supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. */
+@property (nonatomic) BOOL supportsSparseFiles;
+
+/** Supports zero runs, the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. */
+@property (nonatomic) BOOL supportsZeroRuns;
+
+/** Supports case sensitive, treats upper and lower case characters in file and directory names as different. */
+@property (nonatomic) BOOL supportsCaseSensitiveNames;
+
+/** Supports preserving the case of file and directory names. */
+@property (nonatomic) BOOL supportsCasePreservingNames;
+
+/** Supports fast statFS, hints to upper layers to indicate that statfs(2) is fast enough that its results need not be cached by the caller. */
+@property (nonatomic) BOOL supportsFastStatFS;
+
+/** Supports file sizes larger than 4GB, and potentially up to 2TB */
+@property (nonatomic) BOOL supports2TBFiles;
+
+/** Supports open deny modes (e.g., "open for read write, deny write"). */
+@property (nonatomic) BOOL supportsOpenDenyModes;
+
+/** Supports the `UF_HIDDEN` file flag */
+@property (nonatomic) BOOL supportsHiddenFiles;
+
+/** Does not support determining values for total data blocks, available blocks, or free blocks, as in f_blocks, f_bavail, and f_bfree in the struct statFS returned by statfs(2). */
+@property (nonatomic) BOOL doesNotSupportVolumeSizes;
+
+/** Supports 64-bit object IDs, Uses object IDs that are 64-bit. */
+@property (nonatomic) BOOL supports64BitObjectIDs;
+
+/** Supports document IDs (an ID which persists across object ID changes) for document revisions. */
+@property (nonatomic) BOOL supportsDocumentID;
+
+/** Does not support setting the UF_IMMUTABLE flag */
+@property (nonatomic) BOOL doesNotSupportImmutableFiles;
+
+/** Does not support setting file permissions */
+@property (nonatomic) BOOL doesNotSupportSettingFilePermissions;
+
+/** Supports having multiple logical filesystems in a single "partition" which share space. */
+@property (nonatomic) BOOL supportsSharedSpace;
+
+/** Supports having multiple logical filesystems which may be mounted and unmounted together and may present common filesystem identifier information. */
+@property (nonatomic) BOOL supportsVolumeGroups;
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+@interface FSVolume : NSObject
+
+@property (strong, readonly)    FSVolumeIdentifier  *volumeID;
+
+@property (copy)                FSFileName          *name;
+
+-(instancetype)init NS_UNAVAILABLE;
+
+-(instancetype)initWithVolumeID:(FSVolumeIdentifier *)volumeID
+                     volumeName:(FSFileName *)volumeName NS_DESIGNATED_INITIALIZER;
+
+@end
+
+/*
+ * FSVolumePathConfOperations
+ *
+ *      This protocol gathers properties related to the pathfonf and fpathconf
+ * system calls. They are included in FSVolumeOperations and are gathered here as
+ * they behave differently than the operations added in FSVolumeOperations. These
+ * properties return the value imposed by the filesystem for the given property. For
+ * files, this value applies to the file. For directories, this value applies to
+ * all of the items in the directory.
+ *
+ *      Some values are booleans while other values are numeric. Numeric limits
+ * use -1 to represent no limit.
+ *
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.PathConfOperations)
+@protocol FSVolumePathConfOperations <NSObject>
+
+// The maximum number of hard links to the object.
+@property (readonly) int32_t maxLinkCount;
+
+// The maximum length of a component of a filename.
+@property (readonly) int32_t maxNameLength;
+
+// if TRUE, filesystem will reject chown(2) calls if not superuser.
+@property (readonly, getter = isChownRestricted) BOOL chownRestricted;
+
+// If TRUE, filesystem will truncate the filename to maxNameLength if filename is longer than maxNameLength.
+// If FALSE, filesystem will return ENAMETOOLONG if filename is longer than maxNameLength.
+@property (readonly, getter = isLongNameTruncated) BOOL longNameTruncated;
+
+// The number of bits used to store maximum extended attribute size in bytes.
+@property (readonly) int32_t maxXattrSizeInBits;
+
+/*
+ * The minimum number of bits needed to represent, as a signed integer value,
+ * the maximum size of a regular file allowed in the specified directory.
+ * The max file size is 2^(maxFileSizeBits - 1).
+ *
+ *   Maximum file size (bytes)    Maximum (in hex)      Unsigned bits       Signed bits
+ *                      65,535              0xFFFF              16              17
+ *               2,147,483,647          0x7FFFFFFF              31              32
+ *               4,294,967,295          0xFFFFFFFF              32              33
+ *  18,446,744,073,709,551,615  0xFFFFFFFFFFFFFFFF              64              65
+ */
+@property (readonly) int32_t maxFileSizeInBits;
+
+@end
+
+/** 
+ * FSStatFSResult - An interface used to report `volumeStatistics`.
+ * Names are taken from `struct statfs` in `statfs(2)`.
+ * These values will be reported to `statfs(2)` result.
+ * All properties have a default value of 0.  The filesystem should override these values, unless it has no
+ * meaningful values to override with.
+ * One exception is the fsTypeName, which is readonly, and should be set using the designated initializer.
+ */
+FSKIT_API_AVAILABILITY_V1
+@interface FSStatFSResult : NSObject <NSSecureCoding>
+
+/** Block size, in bytes, of the volume */
+@property uint64_t blockSize;
+/** Optimal block size to perform I/O with.
+  * Should be an even multiple of the block size. */
+@property uint64_t ioSize;
+/** Total data blocks in volume */
+@property uint64_t totalBlocks;
+/** Free blocks avail to non-superuser */
+@property uint64_t availableBlocks;
+/** Free blocks in volume */
+@property uint64_t freeBlocks;
+/** Used blocks in volume */
+@property uint64_t usedBlocks;
+/** Total size, in bytes, of the volume */
+@property uint64_t totalBytes;
+/** The amount of space available to users, in bytes, in the volume */
+@property uint64_t availableBytes;
+/** The amount of free space, in bytes, in the volume */
+@property uint64_t freeBytes;
+/** The amount of used space, in bytes, in the volume */
+@property uint64_t usedBytes;
+/** The total number of file slots in the volume */
+@property uint64_t totalFiles;
+/** The total number of free file slots in the volume */
+@property uint64_t freeFiles;
+/** Filesystem sub-type (flavor).
+  * Should match the FSPersonalities's FSSubType attribute, if exists (within the EXAppExtensionAttributes
+  * dictionary of the module\`s Info.plist).  */
+@property uint32_t filesystemSubType;
+/** Filesystem type name.
+ * Should match the FSShortName attribute within the EXAppExtensionAttributes dictionary of the module\`s
+ * Info.plist.  Maximal allowed length is `MFSTYPENAMELEN`, including NUL. */
+@property (readonly, copy) NSString * filesystemTypeName;
+
+- (instancetype)initWithFSTypeName:(NSString *)filesystemTypeName;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.Operations)
+@protocol FSVolumeOperations <NSObject, FSVolumePathConfOperations>
+
+/**
+ * supportedVolumeCapabilities
+ *
+ * report FSVolumeSupportedCapabilities data.
+ * @return an FSVolumeSupportedCapabilities object, with the volume's supported capabilities.
+ */
+@property (readonly, nonatomic) FSVolumeSupportedCapabilities *supportedVolumeCapabilities;
+
+/**
+ * volumeStatistics
+ *
+ * report FSKitStatFSResult data.
+ * @return an FSKitStatFSResult object, with up-to-date volume statistics.
+ */
+@property (readonly, nonatomic) FSStatFSResult * volumeStatistics;
+
+/**
+ * mountWithOptions:replyHandler:
+ *
+ * @brief Some process is trying to mount this volume.
+ * @param reply In case of success, should be called with the newly created root item and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, rootItem is ignored.
+ */
+-(void)mountWithOptions:(FSTaskParameters *)options
+           replyHandler:(void(^)(FSItem * _Nullable rootItem,
+                                 NSError * _Nullable error))reply
+NS_SWIFT_NAME(mount(options:replyHandler:));
+
+/**
+ * unmountWithReplyHandler:
+ *
+ * @brief filesystem is being unmounted. All cached state should be cleaned and flushed.
+ * @discussion Implementation should check wasTerminated property to determine if I/O is safe.
+ *             If the device isn't noted as terminated, the volume should exit in a state in
+ *             which it can be immediately mounted again.
+ */
+-(void)unmountWithReplyHandler:(void(^)(void))reply;
+
+/**
+ * synchronizeWithReplyHandler:
+ *
+ * @brief sync the volume.
+ *        After calling this method, FSKit assumes that the volume
+ *        has sent all pending IOs or metadata to the underlying resource.
+ * @param reply should be called with the relevant error, or nil in case of success.
+ */
+-(void)synchronizeWithReplyHandler:(void(^)(NSError * _Nullable error))reply;
+
+/**
+ * getAttributes:ofItem:replyHandler:
+ *
+ * @brief Fetch the item attributes for the given FSItem.
+ * @param desiredAttributes requested set of attributes to get.
+ *                          A given attribute, ATTR, is requested In case <ATTR>Wanted is set.
+ * @param item item to get the attributes for.
+ * @param reply In case of success, should be called with the requested attrs and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, attributes is ignored.
+ * @discussion For filesystems that do not support hard links,
+ *             linkCount should be 1 for regular files and symbolic links.
+ *             In case the item's bsdFlags contain the UF_COMPRESSED flag,
+ *             the filesystem should return the uncompressed size of the file.
+ */
+-(void)getAttributes:(FSItemGetAttributesRequest *)desiredAttributes
+              ofItem:(FSItem *)item
+        replyHandler:(void(^)(FSItemAttributes * _Nullable attributes,
+                              NSError * _Nullable error))reply
+NS_SWIFT_NAME(getAttributes(_:of:replyHandler:));
+
+/**
+ * setAttributes:onItem:replyHandler:
+ *
+ * @brief Set the given set of item attributes to the given FSItem.
+ * @param newAttributes FSItemSetAttributesRequest including the attributes to set
+ * @param item item to set the attributes for.
+ * @param reply In case of success, should be called with the item's updated attrs
+ *              (using the same semantics as the getItemAttributes call) and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, attributes is ignored.
+ * @discussion Note that several attributes are considered to be "read-only",
+ * and attempts to set those attributes should result in an error of EINVAL being returned.
+ * If "size" is set beyond the end of file and the underlying filesystem does not support
+ * sparse files, space to fulfill the new file size must be allocated and either zero-filled
+ * or otherwise configured to read as zeros.
+ * If "size" is set below the current end of file, the file shall be truncated and any space
+ * no longer required to fulfill the new file size must be returned to the filesystem as
+ * free space.  Attempts to set "size" on directories and symbolic links must
+ * be ignored (and no error should be returned).  If the caller attempts to set
+ * an attribute not supported by the on-disk filesystem format, no error should
+ * be returned; instead, that situation will be detected by the upper layers.
+ */
+-(void)setAttributes:(FSItemSetAttributesRequest *)newAttributes
+              onItem:(FSItem *)item
+        replyHandler:(void(^)(FSItemAttributes * _Nullable attributes,
+                              NSError * _Nullable error))reply
+NS_SWIFT_NAME(setAttributes(_:on:replyHandler:));
+
+/**
+ * lookupItemNamed:inDirectory:replyHandler:
+ *
+ * @brief Lookup an item within a directory.
+ * @param name item name to lookup.
+ * @param directory directory to look the item in.
+ * @param reply In case of success, should be called with the found item,
+ *              the item name (as it's saved within the filesystem), and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, theItem and itemName are ignored.
+ *              If the entry does not exist, complete the request with an error
+ *              with a domain of NSPOSIXErrorDomain and a code of ENOENT.
+
+ */
+-(void)lookupItemNamed:(FSFileName *)name
+           inDirectory:(FSItem *)directory
+          replyHandler:(void(^)(FSItem * _Nullable theItem,
+                                FSFileName * _Nullable itemName,
+                                NSError * _Nullable error))reply
+NS_SWIFT_NAME(lookupItem(named:inDirectory:replyHandler:));
+
+/**
+ * reclaimItem:replyHandler:
+ *
+ * @brief Reclaim an item. Releases any resources allocated for the item.
+ * @param item item to reclaim.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ *              Anyway, the resources allocated for this item should be released.
+ * @discussion FSKit guarantees that for every FSItem returned by the volume,
+ * a corresponding reclaim operation will occur once the upper layers no longer
+ * reference that item.
+ *
+ * Note: block device filesystems may wish to assess if the underlying resource has been terminated
+ * before processing reclaim operations. On Unary filesystems, it is especially easy to assess. When such
+ * resources are disconnected from the system, the associated volumes are unmounted. Unmount triggers
+ * reclaiming of all items, and some implementations have benefited greatly from short-circuiting reclaim
+ * in such cases. As the resource has been terminated, all I/O will report an error, and it's easiest to just
+ * avoid the work.
+ */
+-(void)reclaimItem:(FSItem *)item
+      replyHandler:(void(^)(NSError * _Nullable error))reply
+NS_SWIFT_NAME(reclaim(item:replyHandler:));
+
+/**
+ * readSymbolicLink:replyHandler:
+ *
+ * Read a symbolic link.
+ *
+ * @param item symbolic link item to read from.
+ * @param reply In case of success, should be called with the link's contents
+ *              and error = nil.  Otherwise, should be called with the relevant
+ *              error.  In that case, contents is ignored.  If the item does not
+ *              refer to a symbolic link, complete the request with an error
+ *              with a domain of NSPOSIXErrorDomain and a code of EINVAL.
+ */
+-(void)readSymbolicLink:(FSItem *)item
+           replyHandler:(void(^)(FSFileName * _Nullable contents,
+                                 NSError * _Nullable error))reply;
+
+/**
+ * createItemNamed:type:inDirectory:attributes:replyHandler:
+ *
+ * @brief Create a new file or directory item.
+ * @param name new item's name.
+ * @param type new item's type. Valid options are FSItemTypeFile, FSItemTypeDirectory.
+ * @param directory directory to create the item in.
+ * @param newAttributes Desired set of attributes for the new item.
+ * @param reply In case of success, should be called with the created item, the
+ *              item name (as it's saved within the filesystem), and error = nil.
+ *              Otherwise, should be called with the relevant error.  In that
+ *              case, newItem and newItemName are ignored.  In case there's
+ *              already an item named "name" in the directory, complete the
+ *              request with an error with a domain of NSPOSIXErrorDomain and a
+ *              code of EEXIST.
+ */
+-(void)createItemNamed:(FSFileName *)name
+                  type:(FSItemType)type
+           inDirectory:(FSItem *)directory
+            attributes:(FSItemSetAttributesRequest *)newAttributes
+          replyHandler:(void(^)(FSItem * _Nullable newItem,
+                                FSFileName * _Nullable newItemName,
+                                NSError * _Nullable error))reply
+NS_SWIFT_NAME(createItem(named:type:inDirectory:attributes:replyHandler:));
+
+/**
+ * createSymbolicLinkNamed:inDirectory:attributes:linkContents:replyHandler:
+ *
+ * @brief Create a new symbolic link.
+ * @param name new item's name.
+ * @param directory directory to create the item in.
+ * @param newAttributes Desired set of attributes for the new item.
+ * @param contents Contents of the new symbolic link.
+ * @param reply In case of success, should be called with the created item, the
+ *              item name (as it's saved within the filesystem), and error = nil.
+ *              Otherwise, should be called with the relevant error.  In that
+ *              case, newItem and newItemName are ignored.  In case there's
+ *              already an item named "name" in the directory, complete the
+ *              request with an error with a domain of NSPOSIXErrorDomain and a
+ *              code of EEXIST.
+ */
+-(void)createSymbolicLinkNamed:(FSFileName *)name
+                   inDirectory:(FSItem *)directory
+                    attributes:(FSItemSetAttributesRequest *)newAttributes
+                  linkContents:(FSFileName *)contents
+                  replyHandler:(void(^)(FSItem * _Nullable newItem,
+                                        FSFileName * _Nullable newItemName,
+                                        NSError * _Nullable error))reply
+NS_SWIFT_NAME(createSymbolicLink(named:inDirectory:attributes:linkContents:replyHandler:));
+
+/**
+ * createLinkToItem:named:inDirectory:replyHandler:
+ *
+ * @brief Create a new hard link.
+ * @param item existing item to link to.
+ * @param name new link name.
+ * @param directory directory to create the link in.
+ * @param reply In case of success, should be called with the link name (as it's saved within the
+ *              filesystem) with error = nil.  Otherwise, complete the request with linkName = nil, and an
+ *              error with a domain of NSPOSIXErrorDomain, and the following error code:
+ *              EEXIST, in case there's already an item named "name" in the directory.
+ *              EMLINK, if creating the hard link would result in exceeding the maximum number of hard
+ *              links supported on item.
+ *              ENOTSUP, if the filesystem does not support creating hard links to the type of filesystem
+ *              object represented by item.
+ */
+-(void)createLinkToItem:(FSItem *)item
+                  named:(FSFileName *)name
+            inDirectory:(FSItem *)directory
+           replyHandler:(void(^)(FSFileName * _Nullable linkName,
+                                 NSError * _Nullable error))reply;
+
+/**
+ * removeItem:named:inDirectory:replyHandler:
+ *
+ * @brief Remove an existing item.
+ * @param item item to remove.
+ * @param name item name.
+ * @param directory directory to remove the item from.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ * @discussion This method shouldn't actually remove the item object itself, but
+ *             only remove the given item name from the given directory.
+ *             The item object should be removed (=deallocated) on reclaimItem.
+ */
+-(void)removeItem:(FSItem *)item
+            named:(FSFileName *)name
+    fromDirectory:(FSItem *)directory
+     replyHandler:(void(^)(NSError * _Nullable error))reply
+NS_SWIFT_NAME(remove(item:named:fromDirectory:replyHandler:));
+
+/**
+ * renameItem:inDirectory:named:toNewName:inDirectory:overItem:replyHandler:
+ *
+ * @brief This method is used to rename a filesystem object from one path in the filesystem to another.
+ * @param item The actual filesystem object being renamed.
+ * @param sourceDirectory The directory that currently contains the filesystem object being renamed.
+ * @param sourceName The name within sourceDirectory of the filesystem object being renamed.
+ * @param destinationName  The new name of the filesystem object being renamed within destinationDirectory.
+ * @param destinationDirectory The directory that will contain the renamed filesystem object.
+ *                             Note that this *may* be equal to sourceDirectory.
+ * @param overItem  The filesystem object if destination exists and has been looked-up before. Could be nil.
+ *                 In case it is non-nil, it should be marked as 'deleted', so we would free its allocated
+ *                 space on the next reclaim.  After doing so, the operation must finish without errors.
+ * @param reply In case of success, should be called with the item name (as it's saved within the filesystem), and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, newName is ignored.
+ * @discussion The basic algorithm is as follows:
+ *
+ *      If there is already an object at the "to" location, ensure the objects are compatible:
+ *          -- If the "from" object is not a directory and the "to" object is a directory,
+ *             fail the operation with an error with a domain of NSPOSIXErrorDomain
+ *             and a code of EISDIR.
+ *          -- If the "from" object is a directory and the "to" object is not a directory,
+ *             fail the operation with an error with a domain of NSPOSIXErrorDomain
+ *             and a code of ENOTDIR.
+ *
+ *      If a file move:
+ *          -- If the destination file exists:
+ *              -- Remove the destination file.
+ *          -- If source and destination are in the same directory:
+ *              -- Rewrite name in existing directory entry.
+ *          else:
+ *              -- Write new entry in destination directory.
+ *              -- Clear old directory entry.
+ *
+ *      If a directory move:
+ *          -- If destination directory exists:
+ *              -- If destination directory is not empty, fail the operation
+ *                 with an error with a domain of NSPOSIXErrorDomain and a code of ENOTEMPTY.
+ *              -- Remove the destination directory.
+ *          -- If source and destination are in the same directory:
+ *              -- Rewrite name in existing directory entry.
+ *          else:
+ *              -- Be sure the destination is not a child of the source.
+ *              -- Write new entry in destination directory.
+ *              -- Update "." and ".." in the moved directory.
+ *              -- Clear old directory entry.
+ */
+-(void)renameItem:(FSItem *)item
+      inDirectory:(FSItem *)sourceDirectory
+            named:(FSFileName *)sourceName
+        toNewName:(FSFileName *)destinationName
+      inDirectory:(FSItem *)destinationDirectory
+         overItem:(FSItem * _Nullable)overItem
+     replyHandler:(void(^)(FSFileName * _Nullable newName,
+                           NSError * _Nullable error))reply
+NS_SWIFT_NAME(rename(item:inDirectory:named:toNewName:inDirectory:overItem:replyHandler:));
+
+/**
+ * enumerateDirectory:startingAtCookie:verifier:providingAttributes:usingBlock:replyHandler:
+ *
+ * @brief Enumerate the given directory. Called on readdir(3) and getattrlistbulk(2).
+ *        Directory entries are returned using the FSDirectoryEntryPacker packer block.
+ *        Look at FSDirectoryEntryPacker's definition for further explanation.
+ * @param directory directory to enumerate.
+ * @param cookie used to indicate the location within the directory to enumerate from.  The cookie values
+ *               are chosen by the developer; they're opaque to FSKit.   The first enumerateDirectory
+ *               call will have cookie = FSDirectoryCookieInitial.  The following calls will have
+ *               cookie = the "nextCookie" of the last directory entry packed in the previous call.
+ * @param verifier a tool with which the developer can use to detect if the directory has been changed
+ *                 since the previous call to enumerateDirectory.   The verifier values are chosen by the
+ *                 developer; they're opaque to FSKit.  The first enumerateDirectory call will have
+ *                 verifier = FSDirectoryVerifierInitial.  The following calls will have verifier = the
+ *                 "currentVerifier" returned from the previous call.
+ * @param attributes desired set of attributes to provide. Nil in case no attributes are required.
+ * @param packer packer block to pack the directory entries.
+ * @param reply In case of success, should be called with the current verifier and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, currentVerifier is ignored.
+ * @discussion The general flow of a enumerateDirectory is as follows:
+ *             When an enumeration is started, enumerateDirectory will be called with initial cookie and
+ *             verifier values.  After packing the initial set of directory entries, enumerateDirectory replies
+ *             with the new verifier, a non-zero value that reflects the directory's current version.
+ *             When next called, the next set of directory entries should be packed, starting with the entry
+ *             associated with cookie.  If cookie does not resolve to a valid directory entry, complete the
+ *             request with an error with a domain of FSVolumeErrorDomain and a code of
+ *             FSVolumeErrorBadDirectoryCookie.
+ *
+ *             The volume implementation must ensure that the directory entries' names packed
+ *             are acceptable and unambiguous input to all file operations that take names
+ *             (like lookupName) without additional normalization.
+ *
+ *             Note: In case providingAttributes is not nil, there should always be at least two
+ *             entries in a directory: "." (an entry representing the current directory)
+ *             and ".." (an entry representing the parent directory).
+ *             These entries' type is FSItemTypeDirectory.  In the case of the root directory
+ *             of the filesystem, "." and ".." have identical contents.
+ *             In case providingAttributes = nil, "." and ".." should not be returned.
+ */
+-(void)enumerateDirectory:(FSItem *)directory
+         startingAtCookie:(FSDirectoryCookie)cookie
+                 verifier:(FSDirectoryVerifier)verifier
+      providingAttributes:(FSItemGetAttributesRequest * _Nullable)attributes
+               usingBlock:(FSDirectoryEntryPacker)packer
+             replyHandler:(void(^)(FSDirectoryVerifier currentVerifier,
+                                   NSError * _Nullable error))reply;
+
+/**
+ * activateWithOptions:replyHandler:
+ *
+ * @brief This method is used to activate this volume instance.
+ * @param options activation options. None are currently defined.
+ * @param reply In case of success, should be called with the root FSItem, and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, rootItem is ignored.
+ * @discussion The volume should allocate any in-memory state required to represent the filesystem.
+ *             The volume should allocate an item for the root directory of the filesystem, associate the
+ *             filesystem state with that item, and pass it to the reply block.
+ *             FSKit will cache the root item for the lifetime of the volume
+ *             instance and use it as the jumping off point for all file lookups.
+ */
+-(void)activateWithOptions:(FSTaskParameters *)options
+              replyHandler:(void (^)(FSItem * _Nullable rootItem,
+                                     NSError * _Nullable err))reply
+NS_SWIFT_NAME(activate(options:replyHandler:));
+
+/**
+ * deactivateWithOptions:replyHandler:
+ *
+ * @brief This method is used to tear down a previously-initialized volume instance.
+ * @param options de-activation options. None are currently defined.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ * @discussion The volume should release any resources allocated for the volume instance.
+ *             FSKit will guarantee that all other file nodes associated with this filesystem
+ *             instance will have been released by a reclaim call.  This method should not
+ *             need to perform any I/O; in cases where that is desired, FSKit will have
+ *             already issued a sync call to perform cleanup-related I/O.
+ */
+-(void)deactivateWithOptions:(FSDeactivateOptions)options
+                replyHandler:(void (^)(NSError * _Nullable err))reply
+NS_SWIFT_NAME(deactivate(options:replyHandler:));
+
+@end
+
+/**
+ * @typedef FSSetXattrPolicy
+ * Different flags to dictate the setxattr policy.
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ENUM(NSUInteger, FSSetXattrPolicy) {
+    FSSetXattrPolicyAlwaysSet      = 0,    /* set the value regardless of previous state */
+    FSSetXattrPolicyMustCreate     = 1,    /* set the value, fail if xattr already exists */
+    FSSetXattrPolicyMustReplace    = 2,    /* set the value, fail if xattr does not exist */
+    FSSetXattrPolicyDelete         = 3     /* delete the value, fail if xattr does not exist */
+} NS_SWIFT_NAME(FSVolume.SetXattrPolicy);
+
+/**
+ * @protocol FSVolumeXattrOperations
+ * A protocol for volumes which natively (or partially) support extended attributes.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.XattrOperations)
+@protocol FSVolumeXattrOperations <NSObject>
+
+/**
+ * @property xattrOperationsInhibited
+ * Should be set to 'true' to prevent FSKit from calling this protocol's
+ * methods, even though the volume conforms to it.
+ * FSKit reads this value (if implemented) on mount.
+ * Changing it during the runtime of the volume won't have an effect.
+ */
+@optional
+@property BOOL xattrOperationsInhibited;
+
+/**
+ * supportedXattrNamesForItem:
+ * @brief Returns an array that specifies the Xattr names supported by the given item.
+ *        If the given item does not support any Xattrs, nil should be returned.
+ * @param item item to get the info for.
+ * @discussion Should only be implemented by volumes which want to have "limited" extended attributes
+ *             support (volumes which fundamentally do not support extended attributes, but use
+ *             the extended attribute APIs to expose specific filesystem data).
+ *             Note: If implemented, FSKit would assume that there's a partial xattr support, and would
+ *             only call this protocol's methods for xattr names returned by this method (for each item).
+ */
+-(NSArray<FSFileName *> *)supportedXattrNamesForItem:(FSItem *)item;
+
+@required
+
+/**
+ * xattrNamed:ofItem:replyHandler:
+ *
+ * @brief Get the specified extended attribute of the given item.
+ * @param name extended attribute name.
+ * @param item item to get the extended attribute of.
+ * @param reply In case of success, should be called with the xattr value, and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, value is ignored.
+ *              In case the given attribute does not exist, complete the request with an error with
+ *              a domain of NSPOSIXErrorDomain and a code of ENOATTR.
+ * @discussion Will only be called for extended attributes supported by the given item.
+ */
+-(void)xattrNamed:(FSFileName *)name
+           ofItem:(FSItem *)item
+     replyHandler:(void (^)(NSData * _Nullable value,
+                            NSError * _Nullable error))reply
+NS_SWIFT_NAME(xattr(named:ofItem:replyHandler:));
+
+/**
+ * setXattrNamed:toData:onItem:policy:replyHandler:
+ *
+ * @brief Set the specified extended attribute to item.
+ * @param name extended attribute name.
+ * @param value extended attribute value. It can only be nil in case policy = FSSetXattrPolicyDeleteXattr.
+ * @param item item to set the extended attribute to.
+ * @param policy creation policy. See FSSetXattrPolicy for further documentation.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ */
+-(void)setXattrNamed:(FSFileName *)name
+              toData:(NSData * _Nullable)value
+              onItem:(FSItem *)item
+              policy:(FSSetXattrPolicy)policy
+        replyHandler:(void (^)(NSError * _Nullable error))reply
+NS_SWIFT_NAME(setXattr(named:toData:onItem:policy:replyHandler:));
+
+/**
+ * listXattrsOfItem:replyHandler:
+ *
+ * @brief Get the list of extended attributes currently set on the given item.
+ * @param item item to get the xattr list for.
+ * @param reply In case of success, should be called with the xattr list, and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, value is ignored.
+ */
+-(void)listXattrsOfItem:(FSItem *)item
+           replyHandler:(void (^)(NSArray <FSFileName *> * _Nullable value,
+                                  NSError * _Nullable error))reply;
+
+@end
+
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(NSUInteger, FSVolumeOpenModes) {
+    FSVolumeOpenModesRead = FREAD,
+    FSVolumeOpenModesWrite = FWRITE
+} NS_SWIFT_NAME(FSVolume.OpenModes);
+
+/**
+ * @protocol FSVolumeOpenCloseOperations
+ * A protocol for open/close. Filesystems which want to receive open and
+ * close calls for each item should conform to this protocol. If this protocol is not
+ * implemented, the kernel layer is free to skip making such calls to the volume.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.OpenCloseOperations)
+@protocol FSVolumeOpenCloseOperations <NSObject>
+
+/**
+ * openItem:withMode:replyHandler:
+ *
+ * @brief open a file for access.
+ * @param mode The set of mode flags to open the item with.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ */
+-(void)openItem:(FSItem *)item
+      withModes:(FSVolumeOpenModes)mode
+   replyHandler:(void (^)(NSError * _Nullable error))reply
+NS_SWIFT_NAME(openItem(_:modes:replyHandler:));
+
+/**
+ * closeItem:keepingMode:replyHandler:
+ *
+ * @brief close a file access
+ * @param mode The set of mode flags to keep after this close.
+ * @param reply In case of success, should be called with error = nil.
+ *              Otherwise, should be called with the relevant error.
+ */
+-(void)closeItem:(FSItem *)item
+    keepingModes:(FSVolumeOpenModes)mode
+    replyHandler:(void (^)(NSError * _Nullable error))reply;
+
+@end
+
+/**
+ * @protocol FSVolumeReadWriteOperations
+ * A protocol for read and write operations where we deliver data to/from the extension.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.ReadWriteOperations)
+@protocol FSVolumeReadWriteOperations <NSObject>
+
+/**
+ * readFromFile:offset:length:intoBuffer:replyHandler:
+ *
+ * @brief Read the contents of the given file item.
+ * @param item item to read the contents of.
+ * @param offset offset in file to start reading from.
+ * @param length amount of bytes to read.
+ * @param buffer buffer to store the result in.
+ * @param reply In case of success, should be called with the amount of bytes read, and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, actuallyRead should
+ *              still contain the amount of bytes read before the error.
+ *              In case of the following errors, complete the request with an error with
+ *              a domain of NSPOSIXErrorDomain and the following error code:
+ *              EISDIR, if the item refers to a directory.
+ *              EINVAL, if the item refers to something other than a file or a
+ *                  directory.
+ * @discussion If the number of bytes requested exceeds the number of bytes available
+ *             before the end of the file, then only those bytes are returned.  If offset points
+ *             beyond the last valid byte of the file, the method exit with error = nil and
+ *             actuallyRead = 0.
+ */
+-(void)readFromFile:(FSItem *)item
+             offset:(uint64_t)offset
+             length:(size_t)length
+         intoBuffer:(NSMutableData *)buffer
+       replyHandler:(void(^)(size_t actuallyRead,
+                             NSError * _Nullable error))reply;
+
+/**
+ * writeContents:toFile:atOffset:replyHandler:
+ *
+ * @brief Write contents to the given file item.
+ * @param item item to write contents to
+ * @param offset offset in file to start writing from.
+ * @param contents buffer containing the contents.
+ * @param reply In case of success, should be called with the amount of bytes
+ *              written, and error = nil.  Otherwise, should be called with the
+ *              relevant error.  In that case, actuallyWritten should still
+ *              contain the amount of bytes written before the error.  In case
+ *              of the following errors, complete the request with an error with
+ *              a domain of NSPOSIXErrorDomain and the following error code:
+ *              EISDIR, if the item refers to a directory.
+ *              EINVAL, if the item refers to something other than a file or a
+ *                  directory.
+ *              ENOSPC, if no part of the range was successfully written in an
+ *                  out-of-space condition.
+ * @discussion This routine is expected to allocate space in the filesystem to extend the file as necessary.
+ *             If the filesystem runs out of space, but succeeds in writing any part of the requested range,
+ *             the method should succeed and actuallyWritten should reflect the number of bytes successfully
+ *             written before space was exhausted.
+ */
+- (void)writeContents:(NSData *)contents
+               toFile:(FSItem *)item
+             atOffset:(uint64_t)offset
+         replyHandler:(void(^)(size_t actuallyWritten,
+                               NSError * _Nullable error))reply;
+
+@end
+
+/**
+ * @typedef FSAccessMask
+ * A bitmask of access rights.
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(NSUInteger, FSAccessMask) {
+    FSAccessReadData            = (1<<1),
+    FSAccessListDirectory       = FSAccessReadData,
+    FSAccessWriteData           = (1<<2),
+    FSAccessAddFile             = FSAccessWriteData,
+    FSAccessExecute             = (1<<3),
+    FSAccessSearch              = FSAccessExecute,
+    FSAccessDelete              = (1<<4),
+    FSAccessAppendData          = (1<<5),
+    FSAccessAddSubdirectory     = FSAccessAppendData,
+    FSAccessDeleteChild         = (1<<6),
+    FSAccessReadAttributes      = (1<<7),
+    FSAccessWriteAttributes     = (1<<8),
+    FSAccessReadXattr           = (1<<9),
+    FSAccessWriteXattr          = (1<<10),
+    FSAccessReadSecurity        = (1<<11),
+    FSAccessWriteSecurity       = (1<<12),
+    FSAccessTakeOwnership       = (1<<13),
+} NS_SWIFT_NAME(FSVolume.AccessMask);
+
+/**
+ * @protocol FSVolumeAccessCheckOperations
+ * A protocol for access check operations.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.AccessCheckOperations)
+@protocol FSVolumeAccessCheckOperations <NSObject>
+
+/**
+ * @property accessCheckOperationsInhibited
+ * Should be set to 'true' to prevert FSKit from calling this protocol's
+ * methods, even though the volume conforms to it.
+ * FSKit reads this value (if implemented) on mount.
+ * Changing it during the runtime of the volume won't have an effect.
+ */
+@optional
+@property BOOL accessCheckOperationsInhibited;
+
+@required
+/**
+ * checkAccessToItem:requestedAccess:replyHandler:
+ *
+ * @brief Check if the requested access for the given item is allowed.
+ * @param theItem item to check access for.
+ * @param access requested set of access types to check.
+ * @param reply In case of success, should be called with the result, and error = nil.
+ *              result = 0: access is allowed
+ *              result = EACCES: access is denied.
+ *              Otherwise, should be called with the relevant error. In that case, result is ignored.
+ */
+-(void)checkAccessToItem:(FSItem *)theItem
+         requestedAccess:(FSAccessMask)access
+            replyHandler:(void(^)(BOOL shouldAllowAccess,
+                                  NSError * _Nullable error))reply;
+
+@end
+
+/**
+ * @protocol FSVolumeRenameOperations
+ * A protocol for volume rename operations.
+ */
+FSKIT_API_AVAILABILITY_V1
+NS_SWIFT_NAME(FSVolume.RenameOperations)
+@protocol FSVolumeRenameOperations <NSObject>
+
+/**
+ * @property volumeRenameOperationsInhibited
+ * Should be set to 'true' to prevert FSKit from calling this protocol's
+ * methods, even though the volume conforms to it.
+ * FSKit reads this value (if implemented) on mount.
+ * Changing it during the runtime of the volume won't have an effect.
+ */
+@optional
+@property BOOL volumeRenameOperationsInhibited;
+
+@required
+/**
+ * setVolumeName:replyHandler:
+ *
+ * @brief Set a new name for the volume.
+ * @param name New volume name.
+ * @param reply In case of success, should be called with the new name, and error = nil.
+ *              Otherwise, should be called with the relevant error. In that case, newName is ignored.
+ */
+-(void)setVolumeName:(FSFileName *)name
+        replyHandler:(void(^)(FSFileName *newName,
+                              NSError * _Nullable error))reply;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolumeExtent.h /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolumeExtent.h
--- /Applications/Xcode_16.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolumeExtent.h	1969-12-31 19:00:00
+++ /Applications/Xcode_16.1.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/FSKit.framework/Headers/FSVolumeExtent.h	2024-09-02 23:55:05
@@ -0,0 +1,174 @@
+//
+//  Copyright (c) 2022 Apple Inc. All rights reserved.
+//
+//  FSVolume.h
+//  FSKit
+//
+
+#import <Foundation/Foundation.h>
+#import <FSKit/FSVolume.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef uint64_t FSOperationID;
+
+/**
+ * @typedef FSBlockmapFlags
+ * Different flags for the blockmap operation.
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(uint32_t, FSBlockmapFlags) {
+    FSBlockmapFlagsRead          = 0x000100,
+    FSBlockmapFlagsWrite         = 0x000200,
+    FSBlockmapFlagsAsync         = 0x000400,
+    FSBlockmapFlagsNoCache       = 0x000800,
+    FSBlockmapFlagsFileIssued    = 0x001000,
+};
+
+/**
+ * @typedef FSExtentType
+ * Different flags for an extent type:
+ * - FSExtentTypeData means that the extent contains valid data
+ * - FSExtentTypeZero means that the extent contains no data
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_ENUM(int, FSExtentType) {
+    FSExtentTypeData = 0,
+    FSExtentTypeZero = 1,
+};
+
+/**
+ Extents are used to describe to the kernel parts of the space on disk assigned
+ to a specific file. That space is described by a physical offset on disk, a
+ length and a logical offset within the file.
+ The extent packer takes this information and packs the extent so it can be
+ passed to the kernel.
+ @return YES if the backend needs to continue supplying extents, NO otherwise
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef BOOL (^FSExtentPacker)(FSBlockDeviceResource * resource, FSExtentType type,
+                               uint64_t logicalOffset, uint64_t physicalOffset, uint32_t length);
+
+/*
+ * FSVolumeKOIOOperations - protocol of Kernel Offloaded IO operations
+ */
+FSKIT_API_AVAILABILITY_V1
+@protocol FSVolumeKOIOOperations <NSObject>
+
+/**
+ Map a file's disk space into extents for kernel-offloaded I/O
+ @param item The item that its disk space will be mapped
+ @param theRange The range defining the disk space to map, contains a start point
+                and length
+ @param firstIO YES if this is the first call for this range. The packer can only
+               allocate a certain number of extents internally. When it is out
+               of space, it will return YES, meaning a new blockmapFile is
+               required with a new packer
+ @param operationID A unique identifier of the blockmap call, will be 0 in case
+                   it will be called more than once
+ @param reply A reply block to report back the result
+ */
+- (void)blockmapFile:(FSItem *)item
+               range:(NSRange)theRange
+             startIO:(BOOL)firstIO
+               flags:(FSBlockmapFlags)flags
+         operationID:(FSOperationID)operationID
+         usingPacker:(FSExtentPacker)packer
+        replyHandler:(void (^)(NSError * _Nullable error))reply;
+
+/**
+ Update a file's metadata such as its size and modification time after a
+ kernel-offloaded I/O operation.
+ @param item The item for which I/O was done
+ @param originalRange The range on which the I/O was done
+ @param ioStatus If nil, I/O was successfull. Else, it indicates the error
+ @param flags An enum value indicating the operation type
+ @param operationID A unique identifier of the specific I/O operation
+ */
+- (void)endIO:(FSItem *)item
+        range:(NSRange)originalRange
+       status:(NSError *)ioStatus
+        flags:(FSBlockmapFlags)flags
+  operationID:(FSOperationID)operationID
+ replyHandler:(void (^)(NSError * _Nullable error))reply;
+
+/**
+ Create a file with the given attributes in the given directory using an extent packer.
+ If `newAttributes` define a size > 0, the packer can be used by the implementing
+ backend to map this space and make it ready to use by the kernel, thus saving
+ a call to `blockmapFile` later on.
+ @param name The file's name
+ @param directory The parent directory of the file
+ @param newAttributes Attributes describing the file's properties
+ @param packer An extent packer to be called on the newly allocated space, optional
+ @param reply Reply block to report the new item and the result
+ */
+-(void)createFileNamed:(FSFileName *)name
+           inDirectory:(FSItem *)directory
+            attributes:(FSItemSetAttributesRequest *)newAttributes
+           usingPacker:(FSExtentPacker)packer
+          replyHandler:(void(^)(FSItem * _Nullable newItem,
+                                FSFileName * _Nullable newItemName,
+                                NSError * _Nullable error))reply
+NS_SWIFT_NAME(createFile(named:inDirectory:attributes:packer:replyHandler:));
+
+/**
+ Look up an item of a given name in a given directory, map its disk-space if it
+ is found and it is a file.
+ @param name The item's name
+ @param directory The directory to search the item in
+ @param packer An extent packer to pack the item's allocated disk space if it is a file, optional
+ @param reply A reply block to report back the item and the search result.
+ */
+-(void)lookupItemNamed:(FSFileName *)name
+           inDirectory:(FSItem *)directory
+           usingPacker:(FSExtentPacker)packer
+          replyHandler:(void(^)(FSItem * _Nullable theItem,
+                                FSFileName * _Nullable itemName,
+                                NSError * _Nullable error))reply
+NS_SWIFT_NAME(lookupItem(named:inDirectory:packer:replyHandler:));
+
+@end
+
+/**
+ * @typedef FSPreallocateFlags
+ * Different flags for the preallocate operations.
+ */
+FSKIT_API_AVAILABILITY_V1
+typedef NS_OPTIONS(uint32_t, FSPreallocateFlags) {
+    FSPreallocateAll        = 0x00000002, /*!Allocate all requested space or no space at all*/
+    FSPreallocateContig     = 0x00000004, /*!Allocate contiguous space*/
+    FSPreallocateFromEOF    = 0x00000010, /*!Allocate from the physical end of file*/
+    FSPreallocateFromVol    = 0x00000020, /*!Allocate from the volume offset*/
+};
+
+/*
+ * FSVolumePreallocateOperations
+ */
+FSKIT_API_AVAILABILITY_V1
+@protocol FSVolumePreallocateOperations <NSObject>
+
+@optional
+@property BOOL preallocateOperationsInhibited;
+
+/**
+ Preallocate disk space for an item.
+ @param item The item for which to preallocate space
+ @param offset The offset from which to allocate
+ @param length The length of the space in bytes
+ @param flags Preallocate flags from the `FSPreallocateFlags` described above
+ @param packer If given, used to pack the preallocated space and report it to the kernel
+ @param reply Reply block to report back the result
+ */
+@required
+-(void)preallocate:(FSItem *)item
+            offset:(uint64_t)offset
+            length:(size_t)length
+             flags:(FSPreallocateFlags)flags
+       usingPacker:(FSExtentPacker)packer
+      replyHandler:(void(^)(size_t bytesAllocated,
+                            NSError * _Nullable error))reply;
+
+@end
+
+NS_ASSUME_NONNULL_END
Clone this wiki locally