diff --git a/docs/preview-apis.md b/docs/preview-apis.md index 6e1b888c951b..7481f000be0d 100644 --- a/docs/preview-apis.md +++ b/docs/preview-apis.md @@ -75,4 +75,16 @@ We've tentatively set .NET 10 as the release when we'll stop marking CryptoToken The diagnostic id for CryptoTokenKit is APL0001. +## FSKit (APL0002) + +FSKit is a new framework in macOS 15.0 to implement a file system in user space. + +At the moment implementing a file system is out of our reach, so we haven't +been able to validate the API, and as such we mark every type in this +framework as preview API for a while. + +We've tentatively set .NET 11 as the release when we'll stop marking FSKit as preview API. + +The diagnostic id for CryptoTokenKit is APL0001. + [1]: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute?view=net-8.0 diff --git a/src/FSKit/FSBlockDeviceResource.cs b/src/FSKit/FSBlockDeviceResource.cs new file mode 100644 index 000000000000..181f3df4a983 --- /dev/null +++ b/src/FSKit/FSBlockDeviceResource.cs @@ -0,0 +1,74 @@ +#if NET +using Foundation; + +#nullable enable + +namespace FSKit { + public partial class FSBlockDeviceResource { + public unsafe void Read (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceReadReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + Read ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void SynchronousRead (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceReadReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + SynchronousRead ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void Write (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceWriteReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + Write ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void SynchronousWrite (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceWriteReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + SynchronousWrite ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void SynchronousMetadataRead (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + SynchronousMetadataRead ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void SynchronousMetadataRead (byte [] buffer, long offset, nuint length, FSMetadataReadahead[] readAheadExtents, FSBlockDeviceResourceMetadataReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + fixed (FSMetadataReadahead* readAheadExtentsPtr = readAheadExtents) { + SynchronousMetadataRead ((IntPtr) bufferPtr, offset, length, (IntPtr) readAheadExtentsPtr, readAheadExtents.Length, reply); + } + } + } + + public unsafe void MetadataWrite (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + MetadataWrite ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void SynchronousMetadataWrite (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + SynchronousMetadataWrite ((IntPtr) bufferPtr, offset, length, reply); + } + } + + public unsafe void DelayedMetadataWriteFrom (byte [] buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply) + { + fixed (byte* bufferPtr = buffer) { + DelayedMetadataWriteFrom ((IntPtr) bufferPtr, offset, length, reply); + } + } + } +} +#endif // NET diff --git a/src/FSKit/FSFileName.cs b/src/FSKit/FSFileName.cs new file mode 100644 index 000000000000..8d8442c8d850 --- /dev/null +++ b/src/FSKit/FSFileName.cs @@ -0,0 +1,36 @@ +#if NET +using System; + +using ObjCRuntime; + +#nullable enable + +namespace FSKit { + public partial class FSFileName { + [DesignatedInitializer] + public FSFileName (byte [] bytes) + { + if (bytes is null) + ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bytes)); + + unsafe { + fixed (byte* bytesPtr = bytes) { + InitializeHandle (InitWithBytes ((IntPtr) bytesPtr, (nuint) bytes.Length)); + } + } + } + + public FSFileName Create (byte [] bytes) + { + if (bytes is null) + ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bytes)); + + unsafe { + fixed (byte* bytesPtr = bytes) { + return _Create ((IntPtr) bytesPtr, (nuint) bytes.Length); + } + } + } + } +} +#endif // NET diff --git a/src/FSKit/FSKitFunctions.cs b/src/FSKit/FSKitFunctions.cs new file mode 100644 index 000000000000..33b4efbad5e3 --- /dev/null +++ b/src/FSKit/FSKitFunctions.cs @@ -0,0 +1,59 @@ +#if NET + +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +// Let's hope that by .NET 11 we've ironed out all the bugs in the API. +// This can of course be adjusted as needed (until we've released as stable). +#if NET110_0_OR_GREATER +#define STABLE_FSKIT +#endif + +namespace FSKit { +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [SupportedOSPlatform ("macos15.0")] + [UnsupportedOSPlatform ("maccatalyst")] + [UnsupportedOSPlatform ("ios")] + [UnsupportedOSPlatform ("tvos")] + public static class FSKitFunctions { + [DllImport (Constants.FSKitLibrary)] + static extern IntPtr fskit_std_log (); + + public static NSObject GetStdLog () + { + return Runtime.GetNSObject (fskit_std_log ())!; + } + + [DllImport (Constants.FSKitLibrary)] + static extern IntPtr fs_errorForPOSIXError (int errorCode); + + public static NSError GetErrorForPosixError (int errorCode) + { + return Runtime.GetNSObject (fs_errorForPOSIXError (errorCode))!; + } + + [DllImport (Constants.FSKitLibrary)] + static extern IntPtr fs_errorForMachError (int errorCode); + + public static NSError GetErrorForMachError (int errorCode) + { + return Runtime.GetNSObject (fs_errorForMachError (errorCode))!; + } + + [DllImport (Constants.FSKitLibrary)] + static extern IntPtr fs_errorForCocoaError (int errorCode); + + public static NSError GetErrorForCocoaError (int errorCode) + { + return Runtime.GetNSObject (fs_errorForCocoaError (errorCode))!; + } + } +} +#endif // NET diff --git a/src/FSKit/FSMessageConnection.cs b/src/FSKit/FSMessageConnection.cs new file mode 100644 index 000000000000..89313cdcf334 --- /dev/null +++ b/src/FSKit/FSMessageConnection.cs @@ -0,0 +1,41 @@ +#if NET + +using System; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace FSKit { + public partial class FSMessageConnection { + public NSString GetLocalizedMessage (NSString message, NSString tableName, NSBundle bundle, params NSObject[] arguments) + { + var argumentPtrs = new IntPtr [arguments.Length]; + for (var i = 0; i < arguments.Length; i++) + argumentPtrs [i] = arguments [i].GetNonNullHandle ($"{nameof (arguments)} [{i}]"); + + var rv = Messaging.objc_msgSend_5_vargs ( + this.GetNonNullHandle ("this"), + Selector.GetHandle ("localizedMessage:table:bundle:"), + message.GetNonNullHandle (nameof (message)), + tableName.GetNonNullHandle (nameof (message)), + bundle.GetNonNullHandle (nameof (bundle)), + argumentPtrs); + + GC.KeepAlive (message); + GC.KeepAlive (tableName); + GC.KeepAlive (bundle); + GC.KeepAlive (arguments); + + return Runtime.GetNSObject (rv)!; + } + + public string GetLocalizedMessage (string message, string tableName, NSBundle bundle, params NSObject[] arguments) + { + return (string) GetLocalizedMessage ((NSString) message, (NSString) tableName, bundle, arguments); + } + } +} +#endif // NET diff --git a/src/FSKit/FSMetaReadahead.cs b/src/FSKit/FSMetaReadahead.cs new file mode 100644 index 000000000000..37e8976d389d --- /dev/null +++ b/src/FSKit/FSMetaReadahead.cs @@ -0,0 +1,25 @@ +#if NET + +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +#nullable enable + +// Let's hope that by .NET 11 we've ironed out all the bugs in the API. +// This can of course be adjusted as needed (until we've released as stable). +#if NET110_0_OR_GREATER +#define STABLE_FSKIT +#endif + +namespace FSKit { +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [StructLayout (LayoutKind.Sequential)] + public struct FSMetadataReadahead + { + public long Offset; + public nuint Length; + } +} +#endif diff --git a/src/Foundation/NSObject.mac.cs b/src/Foundation/NSObject.mac.cs index 54f971f171eb..a2c5787ab2fe 100644 --- a/src/Foundation/NSObject.mac.cs +++ b/src/Foundation/NSObject.mac.cs @@ -112,6 +112,7 @@ public partial class NSObject { static IntPtr sm = Dlfcn.dlopen (Constants.ServiceManagementLibrary, 1); static IntPtr sa = Dlfcn.dlopen (Constants.SafetyKitLibrary, 1); static IntPtr cr = Dlfcn.dlopen (Constants.CryptoTokenKitLibrary, 1); + static IntPtr fk = Dlfcn.dlopen (Constants.FSKitLibrary, 1); #if !NET [Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")] diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 9166f24d031a..2286d7909f90 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -2783,6 +2783,7 @@ static IntPtr LookupUnmanagedFunction (IntPtr assembly, IntPtr symbol, int id) } } + internal class IntPtrEqualityComparer : IEqualityComparer { public bool Equals (IntPtr x, IntPtr y) { diff --git a/src/ObjCRuntime/Timespec.cs b/src/ObjCRuntime/Timespec.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/src/bgen/Generator.cs b/src/bgen/Generator.cs index 8c060449bce5..5312f52e8878 100644 --- a/src/bgen/Generator.cs +++ b/src/bgen/Generator.cs @@ -1807,6 +1807,7 @@ void GenerateStrongDictionaryTypes () print ("namespace {0} {{", dictType.Namespace); indent++; PrintPlatformAttributes (dictType); + PrintExperimentalAttribute (dictType); print ("public partial class {0} : DictionaryContainer {{", typeName); indent++; sw.WriteLine ("#if !COREBUILD"); diff --git a/src/build/generator-frameworks.g.cs b/src/build/generator-frameworks.g.cs index 0d1c687ac53b..71252cc8c506 100644 --- a/src/build/generator-frameworks.g.cs +++ b/src/build/generator-frameworks.g.cs @@ -202,6 +202,7 @@ partial class Frameworks { "FileProviderUI", "FinderSync", "Foundation", + "FSKit", "GameController", "GameKit", "GameplayKit", @@ -627,6 +628,7 @@ partial class Frameworks { bool? _FileProviderUI; bool? _FinderSync; bool? _Foundation; + bool? _FSKit; bool? _GameController; bool? _GameKit; bool? _GameplayKit; @@ -797,6 +799,7 @@ partial class Frameworks { public bool HaveFileProviderUI { get { if (!_FileProviderUI.HasValue) _FileProviderUI = GetValue ("FileProviderUI"); return _FileProviderUI.Value; } } public bool HaveFinderSync { get { if (!_FinderSync.HasValue) _FinderSync = GetValue ("FinderSync"); return _FinderSync.Value; } } public bool HaveFoundation { get { if (!_Foundation.HasValue) _Foundation = GetValue ("Foundation"); return _Foundation.Value; } } + public bool HaveFSKit { get { if (!_FSKit.HasValue) _FSKit = GetValue ("FSKit"); return _FSKit.Value; } } public bool HaveGameController { get { if (!_GameController.HasValue) _GameController = GetValue ("GameController"); return _GameController.Value; } } public bool HaveGameKit { get { if (!_GameKit.HasValue) _GameKit = GetValue ("GameKit"); return _GameKit.Value; } } public bool HaveGameplayKit { get { if (!_GameplayKit.HasValue) _GameplayKit = GetValue ("GameplayKit"); return _GameplayKit.Value; } } diff --git a/src/frameworks.sources b/src/frameworks.sources index 4d4a442db986..53884b38adde 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -922,6 +922,17 @@ FOUNDATION_SOURCES = \ Foundation/ToString.cs \ Foundation/NSItemProvider.cs \ +# FSKit + +FSKIT_CORE_SOURCES = \ + FSKit/FSMetaReadahead.cs \ + +FSKIT_SOURCES = \ + FSKit/FSBlockDeviceResource.cs \ + FSKit/FSFileName.cs \ + FSKit/FSKitFunctions.cs \ + FSKit/FSMessageConnection.cs \ + # GameController GAMECONTROLLER_API_SOURCES = \ @@ -2116,6 +2127,7 @@ MACOS_FRAMEWORKS = \ FileProvider \ FileProviderUI \ FinderSync \ + FSKit \ GameController \ GameplayKit \ GLKit \ diff --git a/src/fskit.cs b/src/fskit.cs new file mode 100644 index 000000000000..55d036ec43d5 --- /dev/null +++ b/src/fskit.cs @@ -0,0 +1,1405 @@ +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; + +using CoreFoundation; +using Darwin; +using Foundation; +using ObjCRuntime; + +#if NET + +// Let's hope that by .NET 11 we've ironed out all the bugs in the API. +// This can of course be adjusted as needed (until we've released as stable). +#if NET110_0_OR_GREATER +#define STABLE_FSKIT +#endif + +using FSDirectoryCookie = System.UIntPtr /* NSUInteger= nuint */; +using FSDirectoryVerifier = System.UIntPtr /* NSUInteger= nuint */; +using FSOperationID = System.UInt64; + +namespace FSKit { +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + delegate void FetchInstalledExtensionsCallback ([NullAllowed] FSModuleIdentity[] identities, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface FSClient + { + [Static] + [Async] + [Export ("fetchInstalledExtensionsWithCompletionHandler:")] + void FetchInstalledExtensions (FetchInstalledExtensionsCallback results); + + [Static] + [Export ("installedExtensionsWithError:")] + [return: NullAllowed] + FSModuleIdentity[] GetInstalledExtensions (out NSError error); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + public enum FSContainerState : long + { + NotReady = 0, + Blocked, + Ready, + Active, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (FSEntityIdentifier))] + interface FSContainerIdentifier + { + [Export ("volumeIdentifier")] + FSVolumeIdentifier VolumeIdentifier { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSEntityIdentifier : INSCopying, INSSecureCoding + { + [Export ("initWithUUID:")] + NativeHandle Constructor (NSUuid uuid); + + [Export ("initWithUUID:data:")] + NativeHandle Constructor (NSUuid uuid, NSData qualifier); + + // There's no documentation on what the 'bytes' pointer is, so wait with the binding for it. + // [Export ("initWithUUID:byteQualifier:")] + // NativeHandle Constructor (NSUuid uuid, IntPtr /* sbyte* */ bytes); + + // There's no documentation on what the 'bytes' pointer is, so wait with the binding for it. + // [Export ("initWithUUID:longByteQualifier:")] + // NativeHandle Constructor (NSUuid uuid, IntPtr /* sbyte* */ bytes); + + [Static] + [Export ("identifier")] + FSEntityIdentifier Create (); + + [Static] + [Export ("identifierWithUUID:")] + FSEntityIdentifier Create (NSUuid uuid); + + [Static] + [Export ("identifierWithUUID:data:")] + FSEntityIdentifier Create (NSUuid uuid, NSData qualifier); + + // There's no documentation on what the 'bytes' pointer is, so wait with the binding for it. + // [Static] + // [Export ("identifierWithUUID:byteQualifier:")] + // FSEntityIdentifier CreateWithByteQualifier (NSUuid uuid, IntPtr /* sbyte* */ bytes); + + // There's no documentation on what the 'bytes' pointer is, so wait with the binding for it. + // [Static] + // [Export ("identifierWithUUID:longByteQualifier:")] + // FSEntityIdentifier CreateWithLongByteQualifier (NSUuid uuid, IntPtr /* sbyte* */ bytes); + + [Export ("uuid", ArgumentSemantic.Retain)] + NSUuid Uuid { get; set; } + + [NullAllowed, Export ("qualifier", ArgumentSemantic.Retain)] + NSData Qualifier { get; set; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Category] + [BaseType (typeof (NSUuid))] + interface NSUuid_FSEntityIdentifier + { + [Export ("fs_containerIdentifier")] + FSContainerIdentifier GetFSContainerIdentifier (); + + [Export ("fs_entityIdentifier")] + FSEntityIdentifier GetFSEntityIdentifier (); + + [Export ("fs_volumeIdentifier")] + FSVolumeIdentifier GetFSVolumeIdentifier (); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface FSFileName : INSSecureCoding, INSCopying + { + [Export ("data")] + NSData Data { get; } + + [NullAllowed, Export ("string")] + string String { get; } + + // The C# binding for this ends up being the same as the the initWithCString: selector, which we've already bound. + // [Export ("initWithCString:")] + // [DesignatedInitializer] + // [Internal] + // NativeHandle Constructor (IntPtr name); + + [Export ("initWithBytes:length:")] + [Internal] + NativeHandle InitWithBytes (IntPtr bytes, nuint length); + + [Export ("initWithData:")] + NativeHandle Constructor (NSData name); + + [Export ("initWithString:")] + NativeHandle Constructor (string name); + + // The C# binding for this ends up being the same as the the nameWithString: selector, which we've already bound. + // [Static] + // [Export ("nameWithCString:")] + // [Internal] + // FSFileName _Create (IntPtr name); + + [Static] + [Export ("nameWithBytes:length:")] + [Internal] + FSFileName _Create (IntPtr bytes, nuint length); + + [Static] + [Export ("nameWithData:")] + FSFileName Create (NSData name); + + [Static] + [Export ("nameWithString:")] + FSFileName Create (string name); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSFileSystemBaseWipeResourceCompletionHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSFileSystemBase + { + [Abstract] + [NullAllowed, Export ("errorState", ArgumentSemantic.Strong)] + NSError ErrorState { get; set; } + + [Abstract] + [Export ("containerState", ArgumentSemantic.Assign)] + FSContainerState ContainerState { get; set; } + + [Abstract] + [Export ("wipeResource:includingRanges:excludingRanges:completionHandler:")] + void WipeResource (FSBlockDeviceResource resource, NSIndexSet includingRanges, NSIndexSet excludingRanges, FSFileSystemBaseWipeResourceCompletionHandler completionHandler); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + public enum FSItemAttribute : long { + Uid = 1 << 0, + Gid = 1 << 1, + Mode = 1 << 2, + Type = 1 << 3, + LinkCount = 1 << 4, + Flags = 1 << 5, + Size = 1 << 6, + AllocSize = 1 << 7, + FileId = 1 << 8, + ParentId = 1 << 9, + SupportsLimitedXAttrs = 1 << 10, + /// Inhibit Kernel Offloaded IO. + InhibitKoio = 1 << 11, + ModifyTime = 1 << 12, + AddedTime = 1 << 13, + ChangeTime = 1 << 14, + AccessTime = 1 << 15, + BirthTime = 1 << 16, + BackupTime = 1 << 17, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + public enum FSItemType : long + { + Unknown = 0, + File, + Directory, + Symlink, + Fifo, + CharDevice, + BlockDevice, + Socket, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSItemAttributes : INSSecureCoding + { + [Export ("invalidateAllProperties")] + void InvalidateAllProperties (); + + [Export ("uid")] + uint Uid { get; set; } + + [Export ("gid")] + uint Gid { get; set; } + + [Export ("mode")] + uint Mode { get; set; } + + [Export ("type", ArgumentSemantic.Assign)] + FSItemType Type { get; set; } + + [Export ("linkCount")] + uint LinkCount { get; set; } + + [Export ("flags")] + uint Flags { get; set; } + + [Export ("size")] + ulong Size { get; set; } + + [Export ("allocSize")] + ulong AllocSize { get; set; } + + [Export ("fileID")] + ulong FileId { get; set; } + + [Export ("parentID")] + ulong ParentId { get; set; } + + // KOIO = Kernel Offloaded IO + [Export ("useKOIO")] + bool UseKoio { get; set; } + + [Export ("supportsLimitedXAttrs")] + bool SupportsLimitedXAttrs { get; set; } + + // KOIO = Kernel Offloaded IO + [Export ("inhibitKOIO")] + bool InhibitKoio { get; set; } + + [Export ("modifyTime")] + TimeSpec ModifyTime { get; set; } + + [Export ("addedTime")] + TimeSpec AddedTime { get; set; } + + [Export ("changeTime")] + TimeSpec ChangeTime { get; set; } + + [Export ("accessTime")] + TimeSpec AccessTime { get; set; } + + [Export ("birthTime")] + TimeSpec BirthTime { get; set; } + + [Export ("backupTime")] + TimeSpec BackupTime { get; set; } + + [Export ("isValid:")] + bool IsValid (FSItemAttribute attribute); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (FSItemAttributes))] + interface FSItemSetAttributesRequest + { + [Export ("consumedAttributes")] + FSItemAttribute ConsumedAttributes { get; set; } + + [Export ("wasConsumed:")] + bool WasConsumed (FSItemAttribute attribute); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof(NSObject))] + interface FSItemGetAttributesRequest : INSSecureCoding + { + [Export ("wantedAttributes")] + FSItemAttribute WantedAttributes { get; set; } + + [Export ("isWanted:")] + bool IsWanted (FSItemAttribute attribute); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSItem + { + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (FSItem))] + interface FSUnaryItem + { + [Export ("queue", ArgumentSemantic.Retain)] + DispatchQueue Queue { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Partial] + interface FSKitConstants + { + [Field ("FSKitVersionNumber")] + double FSKitVersionNumber { get; } + + [Field ("FSKitVersionString")] + [Internal] + IntPtr _FSKitVersionString { get; } + + [Static] + string FSKitVersionString { + [Wrap ("Marshal.PtrToStringUTF8 (_FSKitVersionString)!")] + get; + } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSMessageConnectionDidCompleteHandler ([NullAllowed] NSError deliveryError); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSMessageConnection + { + [Abstract] + [Export ("logMessage:")] + void LogMessage (string str); + + [Abstract] + [Export ("didCompleteWithError:completionHandler:")] + void DidComplete ([NullAllowed] NSError taskError, FSMessageConnectionDidCompleteHandler completionHandler); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Static] + interface FSModuleIdentityAttribute { + [Field ("FSModuleIdentityAttributeSupportsServerURLs")] + NSString SupportsServerUrls { get; } + + [Field ("FSModuleIdentityAttributeSupportsBlockResources")] + NSString SupportsBlockResources { get; } + + // KOIO = Kernel Offloaded IO + [Field ("FSModuleIdentityAttributeSupportsKOIO")] + NSString SupportsKoio { get; } + + [Field ("FSModuleIdentityAttributeShortName")] + NSString ShortName { get; } + + [Field ("FSModuleIdentityAttributeMediaTypes")] + NSString MediaTypes { get; } + + [Field ("FSModuleIdentityAttributePersonalities")] + NSString Personalities { get; } + + [Field ("FSModuleIdentityAttributeCheckOptionSyntax")] + NSString CheckOptionSyntax { get; } + + [Field ("FSModuleIdentityAttributeFormatOptionSyntax")] + NSString FormatOptionSyntax { get; } + + [Field ("FSModuleIdentityAttributeActivateOptionSyntax")] + NSString ActivateOptionSyntax { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [StrongDictionary (nameof (FSModuleIdentityAttribute), Suffix = "")] + interface FSModuleIdentityAttributes { + /* There's no documentation about the types of these properties, so I just guessed the types for these properties based on the names whenever possible, otherwise bound as NSObject */ + bool SupportsServerUrls { get; } + bool SupportsBlockResources { get; } + bool SupportsKoio { get; } // KOIO = Kernel Offloaded IO + string ShortName { get; } + NSObject MediaTypes { get; } + NSObject Personalities { get; } + NSObject CheckOptionSyntax { get; } + NSObject FormatOptionSyntax { get; } + NSObject ActivateOptionSyntax { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSModuleIdentity + { + [Export ("bundleIdentifier")] + string BundleIdentifier { get; } + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Export ("attributes")] + NSDictionary WeakAttributes { get; } + + [Wrap ("WeakAttributes")] + FSModuleIdentityAttributes Attributes { get; } + + [Export ("url")] + NSUrl Url { get; } + + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; } + + [Export ("system")] + bool IsSystem { [Bind ("isSystem")] get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + public enum FSMatchResult : long + { + NotRecognized = 0, + Recognized, + UsableButLimited, + Usable, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSResource : INSSecureCoding + { + [Export ("isRevoked")] + bool IsRevoked { get; } + + [Export ("makeProxy")] + FSResource MakeProxy (); + + [Export ("revoke")] + void Revoke (); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface FSMetadataBlockRange + { + [Export ("startBlockOffset")] + long StartBlockOffset { get; } + + [Export ("blockLength")] + uint BlockLength { get; } + + [Export ("numberOfBlocks")] + uint NumberOfBlocks { get; } + + [Export ("initWithOffset:blockLength:numberOfBlocks:")] + NativeHandle Constructor (long startBlockOffset, uint blockLength, uint numberOfBlocks); + + [Static] + [Export ("rangeWithOffset:blockLength:numberOfBlocks:")] + FSMetadataBlockRange Create (long startBlockOffset, uint blockLength, uint numberOfBlocks); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSBlockDeviceResourceReadReplyHandler (nuint actuallyRead, [NullAllowed] NSError error); +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSBlockDeviceResourceWriteReplyHandler (nuint actuallyWritten, [NullAllowed] NSError error); +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSBlockDeviceResourceMetadataReplyHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (FSResource))] + [DisableDefaultCtor] + interface FSBlockDeviceResource + { + [Static] + [Export ("proxyResourceForBSDName:")] + [return: NullAllowed] + FSBlockDeviceResource CreateProxyResource (string bsdName); + + [Static] + [Export ("proxyResourceForBSDName:isWritable:")] + [return: NullAllowed] + FSBlockDeviceResource CreateProxyResource (string bsdName, bool isWritable); + + [Export ("BSDName", ArgumentSemantic.Copy)] + string BsdName { get; } + + [Export ("writable")] + bool Writable { [Bind ("isWritable")] get; } + + [Export ("blockSize")] + ulong BlockSize { get; } + + [Export ("blockCount")] + ulong BlockCount { get; } + + [Export ("physicalBlockSize")] + ulong PhysicalBlockSize { get; } + + [Export ("terminated")] + bool Terminated { [Bind ("isTerminated")] get; } + + [Export ("terminate")] + void Terminate (); + + [Async] + [Export ("readInto:startingAt:length:replyHandler:")] + void Read (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceReadReplyHandler reply); + + [Export ("synchronousReadInto:startingAt:length:replyHandler:")] + void SynchronousRead (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceReadReplyHandler reply); + + [Async] + [Export ("writeFrom:startingAt:length:replyHandler:")] + void Write (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceWriteReplyHandler reply); + + [Export ("synchronousWriteFrom:startingAt:length:replyHandler:")] + void SynchronousWrite (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceWriteReplyHandler reply); + + [Export ("synchronousMetadataReadInto:startingAt:length:replyHandler:")] + void SynchronousMetadataRead (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Export ("synchronousMetadataReadInto:startingAt:length:readAheadExtents:readAheadCount:replyHandler:")] + void SynchronousMetadataRead (IntPtr buffer, long offset, nuint length, IntPtr readAheadExtents, nint readAheadExtentsCount, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Async] + [Export ("metadataWriteFrom:startingAt:length:replyHandler:")] + void MetadataWrite (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Export ("synchronousMetadataWriteFrom:startingAt:length:replyHandler:")] + void SynchronousMetadataWrite (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Async] + [Export ("delayedMetadataWriteFrom:startingAt:length:replyHandler:")] + void DelayedMetadataWriteFrom (IntPtr buffer, long offset, nuint length, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Export ("synchronousMetadataFlushWithReplyHandler:")] + void SynchronousMetadataFlush (FSBlockDeviceResourceMetadataReplyHandler reply); + + [Export ("synchronousMetadataClear:wait:replyHandler:")] + void SynchronousMetadataClear (FSMetadataBlockRange[] rangesToClear, bool wait, FSBlockDeviceResourceMetadataReplyHandler reply); + + [Export ("synchronousMetadataPurge:replyHandler:")] + void SynchronousMetadataPurge (FSMetadataBlockRange[] rangesToPurge, FSBlockDeviceResourceMetadataReplyHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSManageableResourceMaintenanceOperationsHandler ([NullAllowed] NSProgress progress, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSManageableResourceMaintenanceOperations + { + [Export ("checkWithParameters:connection:taskID:replyHandler:")] + void Check (string[] parameters, FSMessageConnection connection, NSUuid taskId, FSManageableResourceMaintenanceOperationsHandler reply); + + [Export ("formatWithParameters:connection:taskID:replyHandler:")] + void Format (string[] parameters, FSMessageConnection connection, NSUuid taskId, FSManageableResourceMaintenanceOperationsHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof(FSResource), Name = "FSGenericURLResource")] + [DisableDefaultCtor] + interface FSGenericUrlResource + { + [Export ("URL", ArgumentSemantic.Strong)] + NSUrl Url { get; } + + [Static] + [Export ("resourceWithURL:")] + [return: NullAllowed] + FSGenericUrlResource Create (NSUrl url); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface FSProbeResult : NSSecureCoding { + [Export ("result")] + FSMatchResult Result { get; } + + [Export ("name", ArgumentSemantic.Copy), NullAllowed] + string Name { get; } + + [Export ("containerID"), NullAllowed] + FSContainerIdentifier ContainerId { get; } + + [return: NullAllowed] + [Static] + [Export ("resultWithResult:name:containerID:")] + FSProbeResult Create (FSMatchResult result, [NullAllowed] string name, [NullAllowed] FSContainerIdentifier containerUuid); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSBlockDeviceOperationsProbeResult ([NullAllowed] FSProbeResult result, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSBlockDeviceOperations + { + [Abstract] + [Export ("probeResource:replyHandler:")] + void ProbeResource (FSResource resource, FSBlockDeviceOperationsProbeResult reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSUnaryFileSystem : FSFileSystemBase { + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSUnaryFileSystemOperationsLoadResourceResult ([NullAllowed] FSVolume volume, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSUnaryFileSystemOperations + { + [Abstract] + [Export ("loadResource:options:replyHandler:")] + void LoadResource (FSResource resource, string[] options, FSUnaryFileSystemOperationsLoadResourceResult reply); + + [Export ("didFinishLoading")] + void DidFinishLoading (); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (FSEntityIdentifier))] + interface FSVolumeIdentifier { + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [ErrorDomain ("FSVolumeErrorDomain")] + [Native] + public enum FSVolumeErrorCode : long + { + BadDirectoryCookie = 1, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + public enum FSDeactivateOptions : long + { + Force = 1 << 0, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + interface FSVolumeSupportedCapabilities : INSSecureCoding + { + [Export ("supportsPersistentObjectIDs")] + bool SupportsPersistentObjectIds { get; set; } + + [Export ("supportsSymbolicLinks")] + bool SupportsSymbolicLinks { get; set; } + + [Export ("supportsHardLinks")] + bool SupportsHardLinks { get; set; } + + [Export ("supportsJournal")] + bool SupportsJournal { get; set; } + + [Export ("supportsActiveJournal")] + bool SupportsActiveJournal { get; set; } + + [Export ("doesNotSupportRootTimes")] + bool DoesNotSupportRootTimes { get; set; } + + [Export ("supportsSparseFiles")] + bool SupportsSparseFiles { get; set; } + + [Export ("supportsZeroRuns")] + bool SupportsZeroRuns { get; set; } + + [Export ("supportsCaseSensitiveNames")] + bool SupportsCaseSensitiveNames { get; set; } + + [Export ("supportsCasePreservingNames")] + bool SupportsCasePreservingNames { get; set; } + + [Export ("supportsFastStatFS")] + bool SupportsFastStatFS { get; set; } + + [Export ("supports2TBFiles")] + bool Supports2TBFiles { get; set; } + + [Export ("supportsOpenDenyModes")] + bool SupportsOpenDenyModes { get; set; } + + [Export ("supportsHiddenFiles")] + bool SupportsHiddenFiles { get; set; } + + [Export ("doesNotSupportVolumeSizes")] + bool DoesNotSupportVolumeSizes { get; set; } + + [Export ("supports64BitObjectIDs")] + bool Supports64BitObjectIds { get; set; } + + [Export ("supportsDocumentID")] + bool SupportsDocumentId { get; set; } + + [Export ("doesNotSupportImmutableFiles")] + bool DoesNotSupportImmutableFiles { get; set; } + + [Export ("doesNotSupportSettingFilePermissions")] + bool DoesNotSupportSettingFilePermissions { get; set; } + + [Export ("supportsSharedSpace")] + bool SupportsSharedSpace { get; set; } + + [Export ("supportsVolumeGroups")] + bool SupportsVolumeGroups { get; set; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface FSVolume + { + [Export ("volumeID", ArgumentSemantic.Strong)] + FSVolumeIdentifier VolumeId { get; } + + [Export ("name", ArgumentSemantic.Copy)] + FSFileName Name { get; set; } + + [DesignatedInitializer] + [Export ("initWithVolumeID:volumeName:")] + NativeHandle Constructor (FSVolumeIdentifier volumeId, FSFileName volumeName); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Static] + interface FSConstants { + [Field ("FSDirectoryCookieInitial")] + nuint FSDirectoryCookieInitial { get; } + + [Field ("FSDirectoryVerifierInitial")] + nuint FSDirectoryVerifierInitial { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumePathConfOperations + { + [Abstract] + [Export ("maxLinkCount")] + int MaxLinkCount { get; } + + [Abstract] + [Export ("maxNameLength")] + int MaxNameLength { get; } + + [Abstract] + [Export ("chownRestricted")] + bool ChownRestricted { [Bind ("isChownRestricted")] get; } + + [Abstract] + [Export ("longNameTruncated")] + bool LongNameTruncated { [Bind ("isLongNameTruncated")] get; } + + [Abstract] + [Export ("maxXattrSizeInBits")] + int MaxXattrSizeInBits { get; } + + [Abstract] + [Export ("maxFileSizeInBits")] + int MaxFileSizeInBits { get; } + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + interface IFSVolumePathConfOperations {} + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface FSStatFSResult : INSSecureCoding + { + [Export ("blockSize")] + ulong BlockSize { get; set; } + + [Export ("ioSize")] + ulong IoSize { get; set; } + + [Export ("totalBlocks")] + ulong TotalBlocks { get; set; } + + [Export ("availableBlocks")] + ulong AvailableBlocks { get; set; } + + [Export ("freeBlocks")] + ulong FreeBlocks { get; set; } + + [Export ("usedBlocks")] + ulong UsedBlocks { get; set; } + + [Export ("totalBytes")] + ulong TotalBytes { get; set; } + + [Export ("availableBytes")] + ulong AvailableBytes { get; set; } + + [Export ("freeBytes")] + ulong FreeBytes { get; set; } + + [Export ("usedBytes")] + ulong UsedBytes { get; set; } + + [Export ("totalFiles")] + ulong TotalFiles { get; set; } + + [Export ("freeFiles")] + ulong FreeFiles { get; set; } + + [Export ("filesystemSubType")] + uint FilesystemSubType { get; set; } + + [Export ("filesystemTypeName", ArgumentSemantic.Copy)] + string FilesystemTypeName { get; } + + [Export ("initWithFSTypeName:")] + NativeHandle Constructor (string filesystemTypeName); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate bool FSDirectoryEntryPacker (FSFileName name, FSItemType itemType, ulong itemId, FSDirectoryCookie nextCookie, [NullAllowed] FSItemAttributes itemAttributes, bool isLast); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsMountHandler ([NullAllowed] FSItem rootItem, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsSynchronizeHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsAttributesHandler ([NullAllowed] FSItemAttributes attributes, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsLookupItemHandler ([NullAllowed] FSItem item, [NullAllowed] FSFileName itemName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsReclaimHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsReadSymbolicLinkHandler ([NullAllowed] FSFileName attributes, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsCreateItemHandler ([NullAllowed] FSItem newItem, [NullAllowed] FSFileName newItemName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsCreateLinkHandler ([NullAllowed] FSFileName newItemName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsRemoveItemHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsRenameItemHandler ([NullAllowed] FSFileName newName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsEnumerateDirectoryHandler (FSDirectoryVerifier currentVerifier, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsActivateHandler ([NullAllowed] FSItem rootItem, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOperationsDeactivateHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeOperations : FSVolumePathConfOperations + { + [Abstract] + [Export ("supportedVolumeCapabilities")] + FSVolumeSupportedCapabilities SupportedVolumeCapabilities { get; } + + [Abstract] + [Export ("volumeStatistics")] + FSStatFSResult VolumeStatistics { get; } + + [Abstract] + [Export ("mountWithOptions:replyHandler:")] + void Mount (string[] options, FSVolumeOperationsMountHandler reply); + + [Abstract] + [Export ("unmountWithReplyHandler:")] + void Unmount (Action reply); + + [Abstract] + [Export ("synchronizeWithReplyHandler:")] + void Synchronize (FSVolumeOperationsSynchronizeHandler reply); + + [Abstract] + [Export ("getAttributes:ofItem:replyHandler:")] + void GetAttributes (FSItemGetAttributesRequest desiredAttributes, FSItem item, FSVolumeOperationsAttributesHandler reply); + + [Abstract] + [Export ("setAttributes:onItem:replyHandler:")] + void SetAttributes (FSItemSetAttributesRequest newAttributes, FSItem item, FSVolumeOperationsAttributesHandler reply); + + [Abstract] + [Export ("lookupItemNamed:inDirectory:replyHandler:")] + void LookupItem (FSFileName name, FSItem directory, FSVolumeOperationsLookupItemHandler reply); + + [Abstract] + [Export ("reclaimItem:replyHandler:")] + void Reclaim (FSItem item, FSVolumeOperationsReclaimHandler reply); + + [Abstract] + [Export ("readSymbolicLink:replyHandler:")] + void ReadSymbolicLink (FSItem item, FSVolumeOperationsReadSymbolicLinkHandler reply); + + [Abstract] + [Export ("createItemNamed:type:inDirectory:attributes:replyHandler:")] + void CreateItem (FSFileName name, FSItemType type, FSItem directory, FSItemSetAttributesRequest newAttributes, FSVolumeOperationsCreateItemHandler reply); + + [Abstract] + [Export ("createSymbolicLinkNamed:inDirectory:attributes:linkContents:replyHandler:")] + void CreateSymbolicLink (FSFileName name, FSItem directory, FSItemSetAttributesRequest newAttributes, FSFileName contents, FSVolumeOperationsCreateItemHandler reply); + + [Abstract] + [Export ("createLinkToItem:named:inDirectory:replyHandler:")] + void CreateLink (FSItem item, FSFileName name, FSItem directory, FSVolumeOperationsCreateLinkHandler reply); + + [Abstract] + [Export ("removeItem:named:fromDirectory:replyHandler:")] + void RemoveItem (FSItem item, FSFileName name, FSItem directory, FSVolumeOperationsRemoveItemHandler reply); + + [Abstract] + [Export ("renameItem:inDirectory:named:toNewName:inDirectory:overItem:replyHandler:")] + void RenameItem (FSItem item, FSItem sourceDirectory, FSFileName sourceName, FSFileName destinationName, FSItem destinationDirectory, [NullAllowed] FSItem overItem, FSVolumeOperationsRenameItemHandler reply); + + [Abstract] + [Export ("enumerateDirectory:startingAtCookie:verifier:providingAttributes:usingBlock:replyHandler:")] + void EnumerateDirectory (FSItem directory, FSDirectoryCookie startingAt, FSDirectoryVerifier verifier, [NullAllowed] FSItemGetAttributesRequest attributes, FSDirectoryEntryPacker packer, FSVolumeOperationsEnumerateDirectoryHandler reply); + + [Abstract] + [Export ("activateWithOptions:replyHandler:")] + void Activate (string[] options, FSVolumeOperationsActivateHandler reply); + + [Abstract] + [Export ("deactivateWithOptions:replyHandler:")] + void Deactivate (FSDeactivateOptions options, FSVolumeOperationsDeactivateHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + enum FSSetXattrPolicy : ulong { + AlwaysSet = 0, + MustCreate = 1, + MustReplace = 2, + Delete = 3, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeXattrOperationsGetHandler ([NullAllowed] NSData value, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeXattrOperationsSetHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeXattrOperationsListHandler ([NullAllowed] FSFileName[] value, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeXattrOperations + { + [Export ("xattrOperationsInhibited")] + bool XattrOperationsInhibited { get; set; } + + [return: NullAllowed] // header says to return null instead of empty array + [Export ("supportedXattrNamesForItem:")] + FSFileName [] GetSupportedXattrNames (FSItem item); + + [Abstract] + [Export ("xattrNamed:ofItem:replyHandler:")] + void GetXattr (FSFileName name, FSItem item, FSVolumeXattrOperationsGetHandler reply); + + [Abstract] + [Export ("setXattrNamed:toData:onItem:policy:replyHandler:")] + void SetXattr (FSFileName name, [NullAllowed] NSData value, FSItem item, FSSetXattrPolicy policy, FSVolumeXattrOperationsSetHandler reply); + + [Abstract] + [Export ("listXattrsOfItem:replyHandler:")] + void ListXattrs (FSItem item, FSVolumeXattrOperationsListHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Native] + [Flags] + enum FSVolumeOpenModes : ulong { + Read = 0x00000001,/* FREAD */ + Write = 0x00000002, /* FWRITE */ + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeOpenCloseOperationsHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeOpenCloseOperations + { + [Abstract] + [Export ("openItem:withModes:replyHandler:")] + void OpenItem (FSItem item, FSVolumeOpenModes mode, FSVolumeOpenCloseOperationsHandler reply); + + [Abstract] + [Export ("closeItem:keepingModes:replyHandler:")] + void CloseItem (FSItem item, FSVolumeOpenModes mode, FSVolumeOpenCloseOperationsHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeReadWriteOperationsReadHandler (nuint actuallyRead, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeReadWriteOperationsWriteHandler (nuint actuallyWritten, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeReadWriteOperations + { + [Abstract] + [Export ("readFromFile:offset:length:intoBuffer:replyHandler:")] + void Read (FSItem item, ulong offset, nuint length, NSMutableData buffer, FSVolumeReadWriteOperationsReadHandler reply); + + [Abstract] + [Export ("writeContents:toFile:atOffset:replyHandler:")] + void Write (NSData contents, FSItem item, ulong offset, FSVolumeReadWriteOperationsWriteHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Flags] + [Native] + enum FSAccessMask : ulong { + ReadData = (1<<1), + ListDirectory = ReadData, + WriteData = (1<<2), + AddFile = WriteData, + Execute = (1<<3), + Search = Execute, + Delete = (1<<4), + AppendData = (1<<5), + AddSubdirectory = AppendData, + DeleteChild = (1<<6), + ReadAttributes = (1<<7), + WriteAttributes = (1<<8), + ReadXattr = (1<<9), + WriteXattr = (1<<10), + ReadSecurity = (1<<11), + WriteSecurity = (1<<12), + TakeOwnership = (1<<13), + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeAccessCheckOperationsCheckAccessHandler (bool shouldAllowAccess, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeAccessCheckOperations + { + [Export ("accessCheckOperationsInhibited")] + bool AccessCheckOperationsInhibited { get; set; } + + [Abstract] + [Export ("checkAccessToItem:requestedAccess:replyHandler:")] + void CheckAccess (FSItem theItem, FSAccessMask access, FSVolumeAccessCheckOperationsCheckAccessHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeRenameOperationsSetVolumeNameHandler (FSFileName newName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeRenameOperations + { + [Export ("volumeRenameOperationsInhibited")] + bool VolumeRenameOperationsInhibited { get; set; } + + [Abstract] + [Export ("setVolumeName:replyHandler:")] + void RenameVolume (FSFileName name, FSVolumeRenameOperationsSetVolumeNameHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Flags] + public enum FSBlockmapFlags : uint { + Read = 0x000100, + Write = 0x000200, + Async = 0x000400, + NoCache = 0x000800, + FileIssued = 0x001000, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + public enum FSExtentType + { + Data = 0, + Zero = 1, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate bool FSExtentPacker (FSBlockDeviceResource resource, FSExtentType type, ulong logicalOffset, ulong physicalOffset, uint length); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeKoioOperationsHandler ([NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeKoioOperationsCreateFileHandler ([NullAllowed] FSItem newItem, [NullAllowed] FSFileName newItemName, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumeKoioOperationsLookupItemHandler ([NullAllowed] FSItem newItem, [NullAllowed] FSFileName newItemName, [NullAllowed] NSError error); + + // KOIO = Kernel Offloaded IO +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (Name = "FSVolumeKOIOOperations", BackwardsCompatibleCodeGeneration = false)] + interface FSVolumeKoioOperations + { + [Abstract] + [Export ("blockmapFile:range:startIO:flags:operationID:usingPacker:replyHandler:")] + void BlockmapFile (FSItem item, NSRange theRange, bool firstIo, FSBlockmapFlags flags, FSOperationID operationId, FSExtentPacker packer, FSVolumeKoioOperationsHandler reply); + + [Abstract] + [Export ("endIO:range:status:flags:operationID:replyHandler:")] + void EndIo (FSItem item, NSRange originalRange, NSError ioStatus, FSBlockmapFlags flags, FSOperationID operationId, FSVolumeKoioOperationsHandler reply); + + [Abstract] + [Export ("createFileNamed:inDirectory:attributes:usingPacker:replyHandler:")] + void CreateFile (FSFileName name, FSItem directory, FSItemSetAttributesRequest newAttributes, FSExtentPacker packer, FSVolumeKoioOperationsCreateFileHandler reply); + + [Abstract] + [Export ("lookupItemNamed:inDirectory:usingPacker:replyHandler:")] + void LookupItem (FSFileName name, FSItem directory, FSExtentPacker packer, FSVolumeKoioOperationsLookupItemHandler reply); + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Flags] + enum FSPreallocateFlags : uint { + All = 0x00000002, + Contig = 0x00000004, + FromEof = 0x00000010, + FromVol = 0x00000020, + } + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + delegate void FSVolumePreallocateOperationsHandler (nuint bytesAllocated, [NullAllowed] NSError error); + +#if !STABLE_FSKIT + [Experimental ("APL0002")] +#endif + [Mac (15, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface FSVolumePreallocateOperations + { + [Export ("preallocateOperationsInhibited")] + bool PreallocateOperationsInhibited { get; set; } + + [Abstract] + [Export ("preallocate:offset:length:flags:usingPacker:replyHandler:")] + void Preallocate (FSItem item, ulong offset, nuint length, FSPreallocateFlags flags, FSExtentPacker packer, FSVolumePreallocateOperationsHandler reply); + } +} + +#endif // NET diff --git a/src/rsp/dotnet/macos-defines-dotnet.rsp b/src/rsp/dotnet/macos-defines-dotnet.rsp index c397de592022..05c5bf0e4d70 100644 --- a/src/rsp/dotnet/macos-defines-dotnet.rsp +++ b/src/rsp/dotnet/macos-defines-dotnet.rsp @@ -50,6 +50,7 @@ -d:HAS_FILEPROVIDERUI -d:HAS_FINDERSYNC -d:HAS_FOUNDATION +-d:HAS_FSKIT -d:HAS_GAMECONTROLLER -d:HAS_GAMEKIT -d:HAS_GAMEPLAYKIT diff --git a/src/rsp/macos-defines.rsp b/src/rsp/macos-defines.rsp index e03677260fe9..96104c877266 100644 --- a/src/rsp/macos-defines.rsp +++ b/src/rsp/macos-defines.rsp @@ -51,6 +51,7 @@ -d:HAS_FILEPROVIDERUI -d:HAS_FINDERSYNC -d:HAS_FOUNDATION +-d:HAS_FSKIT -d:HAS_GAMECONTROLLER -d:HAS_GAMEKIT -d:HAS_GAMEPLAYKIT diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index ae76c820a965..bce47481801f 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -10215,6 +10215,77 @@ F:Foundation.NSXpcConnectionOptions.Privileged F:Foundation.NSZone.Default F:Foundation.PreserveAttribute.AllMembers F:Foundation.PreserveAttribute.Conditional +F:FSKit.FSAccessMask.AddFile +F:FSKit.FSAccessMask.AddSubdirectory +F:FSKit.FSAccessMask.AppendData +F:FSKit.FSAccessMask.Delete +F:FSKit.FSAccessMask.DeleteChild +F:FSKit.FSAccessMask.Execute +F:FSKit.FSAccessMask.ListDirectory +F:FSKit.FSAccessMask.ReadAttributes +F:FSKit.FSAccessMask.ReadData +F:FSKit.FSAccessMask.ReadSecurity +F:FSKit.FSAccessMask.ReadXattr +F:FSKit.FSAccessMask.Search +F:FSKit.FSAccessMask.TakeOwnership +F:FSKit.FSAccessMask.WriteAttributes +F:FSKit.FSAccessMask.WriteData +F:FSKit.FSAccessMask.WriteSecurity +F:FSKit.FSAccessMask.WriteXattr +F:FSKit.FSBlockmapFlags.Async +F:FSKit.FSBlockmapFlags.FileIssued +F:FSKit.FSBlockmapFlags.NoCache +F:FSKit.FSBlockmapFlags.Read +F:FSKit.FSBlockmapFlags.Write +F:FSKit.FSContainerState.Active +F:FSKit.FSContainerState.Blocked +F:FSKit.FSContainerState.NotReady +F:FSKit.FSContainerState.Ready +F:FSKit.FSDeactivateOptions.Force +F:FSKit.FSExtentType.Data +F:FSKit.FSExtentType.Zero +F:FSKit.FSItemAttribute.AccessTime +F:FSKit.FSItemAttribute.AddedTime +F:FSKit.FSItemAttribute.AllocSize +F:FSKit.FSItemAttribute.BackupTime +F:FSKit.FSItemAttribute.BirthTime +F:FSKit.FSItemAttribute.ChangeTime +F:FSKit.FSItemAttribute.FileId +F:FSKit.FSItemAttribute.Flags +F:FSKit.FSItemAttribute.Gid +F:FSKit.FSItemAttribute.LinkCount +F:FSKit.FSItemAttribute.Mode +F:FSKit.FSItemAttribute.ModifyTime +F:FSKit.FSItemAttribute.ParentId +F:FSKit.FSItemAttribute.Size +F:FSKit.FSItemAttribute.SupportsLimitedXAttrs +F:FSKit.FSItemAttribute.Type +F:FSKit.FSItemAttribute.Uid +F:FSKit.FSItemType.BlockDevice +F:FSKit.FSItemType.CharDevice +F:FSKit.FSItemType.Directory +F:FSKit.FSItemType.Fifo +F:FSKit.FSItemType.File +F:FSKit.FSItemType.Socket +F:FSKit.FSItemType.Symlink +F:FSKit.FSItemType.Unknown +F:FSKit.FSMatchResult.NotRecognized +F:FSKit.FSMatchResult.Recognized +F:FSKit.FSMatchResult.Usable +F:FSKit.FSMatchResult.UsableButLimited +F:FSKit.FSMetadataReadahead.Length +F:FSKit.FSMetadataReadahead.Offset +F:FSKit.FSPreallocateFlags.All +F:FSKit.FSPreallocateFlags.Contig +F:FSKit.FSPreallocateFlags.FromEof +F:FSKit.FSPreallocateFlags.FromVol +F:FSKit.FSSetXattrPolicy.AlwaysSet +F:FSKit.FSSetXattrPolicy.Delete +F:FSKit.FSSetXattrPolicy.MustCreate +F:FSKit.FSSetXattrPolicy.MustReplace +F:FSKit.FSVolumeErrorCode.BadDirectoryCookie +F:FSKit.FSVolumeOpenModes.Read +F:FSKit.FSVolumeOpenModes.Write F:GameController.GCAcceleration.X F:GameController.GCAcceleration.Y F:GameController.GCAcceleration.Z @@ -15721,6 +15792,7 @@ F:ObjCRuntime.Constants.FileProviderLibrary F:ObjCRuntime.Constants.FileProviderUILibrary F:ObjCRuntime.Constants.FinderSyncLibrary F:ObjCRuntime.Constants.FoundationLibrary +F:ObjCRuntime.Constants.FSKitLibrary F:ObjCRuntime.Constants.GameControllerLibrary F:ObjCRuntime.Constants.GameKitLibrary F:ObjCRuntime.Constants.GameplayKitLibrary @@ -35611,6 +35683,113 @@ M:Foundation.UNCDidActivateNotificationEventArgs.#ctor(Foundation.NSUserNotifica M:Foundation.UNCDidDeliverNotificationEventArgs.#ctor(Foundation.NSUserNotification) M:Foundation.XpcInterfaceAttribute.#ctor M:Foundation.You_Should_Not_Call_base_In_This_Method.#ctor +M:FSKit.FSBlockDeviceResource.CreateProxyResource(System.String,System.Boolean) +M:FSKit.FSBlockDeviceResource.CreateProxyResource(System.String) +M:FSKit.FSBlockDeviceResource.DelayedMetadataWriteFrom(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.DelayedMetadataWriteFrom(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.DelayedMetadataWriteFromAsync(System.IntPtr,System.Int64,System.UIntPtr) +M:FSKit.FSBlockDeviceResource.MetadataWrite(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.MetadataWrite(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.MetadataWriteAsync(System.IntPtr,System.Int64,System.UIntPtr) +M:FSKit.FSBlockDeviceResource.Read(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceReadReplyHandler) +M:FSKit.FSBlockDeviceResource.Read(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceReadReplyHandler) +M:FSKit.FSBlockDeviceResource.ReadAsync(System.IntPtr,System.Int64,System.UIntPtr) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataClear(FSKit.FSMetadataBlockRange[],System.Boolean,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataFlush(FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataPurge(FSKit.FSMetadataBlockRange[],FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataRead(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataRead(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSMetadataReadahead[],FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataRead(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataRead(System.IntPtr,System.Int64,System.UIntPtr,System.IntPtr,System.IntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataWrite(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousMetadataWrite(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceMetadataReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousRead(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceReadReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousRead(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceReadReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousWrite(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceWriteReplyHandler) +M:FSKit.FSBlockDeviceResource.SynchronousWrite(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceWriteReplyHandler) +M:FSKit.FSBlockDeviceResource.Terminate +M:FSKit.FSBlockDeviceResource.Write(System.Byte[],System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceWriteReplyHandler) +M:FSKit.FSBlockDeviceResource.Write(System.IntPtr,System.Int64,System.UIntPtr,FSKit.FSBlockDeviceResourceWriteReplyHandler) +M:FSKit.FSBlockDeviceResource.WriteAsync(System.IntPtr,System.Int64,System.UIntPtr) +M:FSKit.FSClient.FetchInstalledExtensions(FSKit.FetchInstalledExtensionsCallback) +M:FSKit.FSClient.FetchInstalledExtensionsAsync +M:FSKit.FSClient.GetInstalledExtensions(Foundation.NSError@) +M:FSKit.FSEntityIdentifier.#ctor(Foundation.NSUuid,Foundation.NSData) +M:FSKit.FSEntityIdentifier.#ctor(Foundation.NSUuid) +M:FSKit.FSEntityIdentifier.Create +M:FSKit.FSEntityIdentifier.Create(Foundation.NSUuid,Foundation.NSData) +M:FSKit.FSEntityIdentifier.Create(Foundation.NSUuid) +M:FSKit.FSFileName.#ctor(Foundation.NSData) +M:FSKit.FSFileName.#ctor(System.Byte[]) +M:FSKit.FSFileName.#ctor(System.String) +M:FSKit.FSFileName.Create(Foundation.NSData) +M:FSKit.FSFileName.Create(System.Byte[]) +M:FSKit.FSFileName.Create(System.String) +M:FSKit.FSGenericUrlResource.Create(Foundation.NSUrl) +M:FSKit.FSItemAttributes.InvalidateAllProperties +M:FSKit.FSItemAttributes.IsValid(FSKit.FSItemAttribute) +M:FSKit.FSItemGetAttributesRequest.IsWanted(FSKit.FSItemAttribute) +M:FSKit.FSItemSetAttributesRequest.WasConsumed(FSKit.FSItemAttribute) +M:FSKit.FSKitConstants.#ctor +M:FSKit.FSKitFunctions.GetErrorForCocoaError(System.Int32) +M:FSKit.FSKitFunctions.GetErrorForMachError(System.Int32) +M:FSKit.FSKitFunctions.GetErrorForPosixError(System.Int32) +M:FSKit.FSKitFunctions.GetStdLog +M:FSKit.FSMessageConnection.DidComplete(Foundation.NSError,FSKit.FSMessageConnectionDidCompleteHandler) +M:FSKit.FSMessageConnection.GetLocalizedMessage(Foundation.NSString,Foundation.NSString,Foundation.NSBundle,Foundation.NSObject[]) +M:FSKit.FSMessageConnection.GetLocalizedMessage(System.String,System.String,Foundation.NSBundle,Foundation.NSObject[]) +M:FSKit.FSMessageConnection.LogMessage(System.String) +M:FSKit.FSMetadataBlockRange.#ctor(System.Int64,System.UInt32,System.UInt32) +M:FSKit.FSMetadataBlockRange.Create(System.Int64,System.UInt32,System.UInt32) +M:FSKit.FSModuleIdentityAttributes.#ctor +M:FSKit.FSModuleIdentityAttributes.#ctor(Foundation.NSDictionary) +M:FSKit.FSProbeResult.Create(FSKit.FSMatchResult,System.String,FSKit.FSContainerIdentifier) +M:FSKit.FSProbeResult.EncodeTo(Foundation.NSCoder) +M:FSKit.FSResource.MakeProxy +M:FSKit.FSResource.Revoke +M:FSKit.FSStatFSResult.#ctor(System.String) +M:FSKit.FSUnaryFileSystem.WipeResource(FSKit.FSBlockDeviceResource,Foundation.NSIndexSet,Foundation.NSIndexSet,FSKit.FSFileSystemBaseWipeResourceCompletionHandler) +M:FSKit.FSVolume.#ctor(FSKit.FSVolumeIdentifier,FSKit.FSFileName) +M:FSKit.IFSBlockDeviceOperations.ProbeResource(FSKit.FSResource,FSKit.FSBlockDeviceOperationsProbeResult) +M:FSKit.IFSFileSystemBase.WipeResource(FSKit.FSBlockDeviceResource,Foundation.NSIndexSet,Foundation.NSIndexSet,FSKit.FSFileSystemBaseWipeResourceCompletionHandler) +M:FSKit.IFSManageableResourceMaintenanceOperations.Check(System.String[],FSKit.FSMessageConnection,Foundation.NSUuid,FSKit.FSManageableResourceMaintenanceOperationsHandler) +M:FSKit.IFSManageableResourceMaintenanceOperations.Format(System.String[],FSKit.FSMessageConnection,Foundation.NSUuid,FSKit.FSManageableResourceMaintenanceOperationsHandler) +M:FSKit.IFSUnaryFileSystemOperations.DidFinishLoading +M:FSKit.IFSUnaryFileSystemOperations.LoadResource(FSKit.FSResource,System.String[],FSKit.FSUnaryFileSystemOperationsLoadResourceResult) +M:FSKit.IFSVolumeAccessCheckOperations.CheckAccess(FSKit.FSItem,FSKit.FSAccessMask,FSKit.FSVolumeAccessCheckOperationsCheckAccessHandler) +M:FSKit.IFSVolumeKoioOperations.BlockmapFile(FSKit.FSItem,Foundation.NSRange,System.Boolean,FSKit.FSBlockmapFlags,System.UInt64,FSKit.FSExtentPacker,FSKit.FSVolumeKoioOperationsHandler) +M:FSKit.IFSVolumeKoioOperations.CreateFile(FSKit.FSFileName,FSKit.FSItem,FSKit.FSItemSetAttributesRequest,FSKit.FSExtentPacker,FSKit.FSVolumeKoioOperationsCreateFileHandler) +M:FSKit.IFSVolumeKoioOperations.EndIo(FSKit.FSItem,Foundation.NSRange,Foundation.NSError,FSKit.FSBlockmapFlags,System.UInt64,FSKit.FSVolumeKoioOperationsHandler) +M:FSKit.IFSVolumeKoioOperations.LookupItem(FSKit.FSFileName,FSKit.FSItem,FSKit.FSExtentPacker,FSKit.FSVolumeKoioOperationsLookupItemHandler) +M:FSKit.IFSVolumeOpenCloseOperations.CloseItem(FSKit.FSItem,FSKit.FSVolumeOpenModes,FSKit.FSVolumeOpenCloseOperationsHandler) +M:FSKit.IFSVolumeOpenCloseOperations.OpenItem(FSKit.FSItem,FSKit.FSVolumeOpenModes,FSKit.FSVolumeOpenCloseOperationsHandler) +M:FSKit.IFSVolumeOperations.Activate(System.String[],FSKit.FSVolumeOperationsActivateHandler) +M:FSKit.IFSVolumeOperations.CreateItem(FSKit.FSFileName,FSKit.FSItemType,FSKit.FSItem,FSKit.FSItemSetAttributesRequest,FSKit.FSVolumeOperationsCreateItemHandler) +M:FSKit.IFSVolumeOperations.CreateLink(FSKit.FSItem,FSKit.FSFileName,FSKit.FSItem,FSKit.FSVolumeOperationsCreateLinkHandler) +M:FSKit.IFSVolumeOperations.CreateSymbolicLink(FSKit.FSFileName,FSKit.FSItem,FSKit.FSItemSetAttributesRequest,FSKit.FSFileName,FSKit.FSVolumeOperationsCreateItemHandler) +M:FSKit.IFSVolumeOperations.Deactivate(FSKit.FSDeactivateOptions,FSKit.FSVolumeOperationsDeactivateHandler) +M:FSKit.IFSVolumeOperations.EnumerateDirectory(FSKit.FSItem,System.UIntPtr,System.UIntPtr,FSKit.FSItemGetAttributesRequest,FSKit.FSDirectoryEntryPacker,FSKit.FSVolumeOperationsEnumerateDirectoryHandler) +M:FSKit.IFSVolumeOperations.GetAttributes(FSKit.FSItemGetAttributesRequest,FSKit.FSItem,FSKit.FSVolumeOperationsAttributesHandler) +M:FSKit.IFSVolumeOperations.LookupItem(FSKit.FSFileName,FSKit.FSItem,FSKit.FSVolumeOperationsLookupItemHandler) +M:FSKit.IFSVolumeOperations.Mount(System.String[],FSKit.FSVolumeOperationsMountHandler) +M:FSKit.IFSVolumeOperations.ReadSymbolicLink(FSKit.FSItem,FSKit.FSVolumeOperationsReadSymbolicLinkHandler) +M:FSKit.IFSVolumeOperations.Reclaim(FSKit.FSItem,FSKit.FSVolumeOperationsReclaimHandler) +M:FSKit.IFSVolumeOperations.RemoveItem(FSKit.FSItem,FSKit.FSFileName,FSKit.FSItem,FSKit.FSVolumeOperationsRemoveItemHandler) +M:FSKit.IFSVolumeOperations.RenameItem(FSKit.FSItem,FSKit.FSItem,FSKit.FSFileName,FSKit.FSFileName,FSKit.FSItem,FSKit.FSItem,FSKit.FSVolumeOperationsRenameItemHandler) +M:FSKit.IFSVolumeOperations.SetAttributes(FSKit.FSItemSetAttributesRequest,FSKit.FSItem,FSKit.FSVolumeOperationsAttributesHandler) +M:FSKit.IFSVolumeOperations.Synchronize(FSKit.FSVolumeOperationsSynchronizeHandler) +M:FSKit.IFSVolumeOperations.Unmount(System.Action) +M:FSKit.IFSVolumePreallocateOperations.Preallocate(FSKit.FSItem,System.UInt64,System.UIntPtr,FSKit.FSPreallocateFlags,FSKit.FSExtentPacker,FSKit.FSVolumePreallocateOperationsHandler) +M:FSKit.IFSVolumeReadWriteOperations.Read(FSKit.FSItem,System.UInt64,System.UIntPtr,Foundation.NSMutableData,FSKit.FSVolumeReadWriteOperationsReadHandler) +M:FSKit.IFSVolumeReadWriteOperations.Write(Foundation.NSData,FSKit.FSItem,System.UInt64,FSKit.FSVolumeReadWriteOperationsWriteHandler) +M:FSKit.IFSVolumeRenameOperations.RenameVolume(FSKit.FSFileName,FSKit.FSVolumeRenameOperationsSetVolumeNameHandler) +M:FSKit.IFSVolumeXattrOperations.GetSupportedXattrNames(FSKit.FSItem) +M:FSKit.IFSVolumeXattrOperations.GetXattr(FSKit.FSFileName,FSKit.FSItem,FSKit.FSVolumeXattrOperationsGetHandler) +M:FSKit.IFSVolumeXattrOperations.ListXattrs(FSKit.FSItem,FSKit.FSVolumeXattrOperationsListHandler) +M:FSKit.IFSVolumeXattrOperations.SetXattr(FSKit.FSFileName,Foundation.NSData,FSKit.FSItem,FSKit.FSSetXattrPolicy,FSKit.FSVolumeXattrOperationsSetHandler) +M:FSKit.NSUuid_FSEntityIdentifier.GetFSContainerIdentifier(Foundation.NSUuid) +M:FSKit.NSUuid_FSEntityIdentifier.GetFSEntityIdentifier(Foundation.NSUuid) +M:FSKit.NSUuid_FSEntityIdentifier.GetFSVolumeIdentifier(Foundation.NSUuid) M:GameController.GCColor.#ctor(System.Single,System.Single,System.Single) M:GameController.GCColor.Copy(Foundation.NSZone) M:GameController.GCColor.EncodeTo(Foundation.NSCoder) @@ -65569,6 +65748,128 @@ P:Foundation.RegisterAttribute.Name P:Foundation.RegisterAttribute.SkipRegistration P:Foundation.UNCDidActivateNotificationEventArgs.Notification P:Foundation.UNCDidDeliverNotificationEventArgs.Notification +P:FSKit.FSBlockDeviceResource.BlockCount +P:FSKit.FSBlockDeviceResource.BlockSize +P:FSKit.FSBlockDeviceResource.BsdName +P:FSKit.FSBlockDeviceResource.PhysicalBlockSize +P:FSKit.FSBlockDeviceResource.Terminated +P:FSKit.FSBlockDeviceResource.Writable +P:FSKit.FSConstants.FSDirectoryCookieInitial +P:FSKit.FSConstants.FSDirectoryVerifierInitial +P:FSKit.FSContainerIdentifier.VolumeIdentifier +P:FSKit.FSEntityIdentifier.Qualifier +P:FSKit.FSEntityIdentifier.Uuid +P:FSKit.FSFileName.Data +P:FSKit.FSFileName.String +P:FSKit.FSGenericUrlResource.Url +P:FSKit.FSItemAttributes.AccessTime +P:FSKit.FSItemAttributes.AddedTime +P:FSKit.FSItemAttributes.AllocSize +P:FSKit.FSItemAttributes.BackupTime +P:FSKit.FSItemAttributes.BirthTime +P:FSKit.FSItemAttributes.ChangeTime +P:FSKit.FSItemAttributes.FileId +P:FSKit.FSItemAttributes.Flags +P:FSKit.FSItemAttributes.Gid +P:FSKit.FSItemAttributes.InhibitKoio +P:FSKit.FSItemAttributes.LinkCount +P:FSKit.FSItemAttributes.Mode +P:FSKit.FSItemAttributes.ModifyTime +P:FSKit.FSItemAttributes.ParentId +P:FSKit.FSItemAttributes.Size +P:FSKit.FSItemAttributes.SupportsLimitedXAttrs +P:FSKit.FSItemAttributes.Type +P:FSKit.FSItemAttributes.Uid +P:FSKit.FSItemAttributes.UseKoio +P:FSKit.FSItemGetAttributesRequest.WantedAttributes +P:FSKit.FSItemSetAttributesRequest.ConsumedAttributes +P:FSKit.FSKitConstants.FSKitVersionNumber +P:FSKit.FSKitConstants.FSKitVersionString +P:FSKit.FSMetadataBlockRange.BlockLength +P:FSKit.FSMetadataBlockRange.NumberOfBlocks +P:FSKit.FSMetadataBlockRange.StartBlockOffset +P:FSKit.FSModuleIdentity.Attributes +P:FSKit.FSModuleIdentity.BundleIdentifier +P:FSKit.FSModuleIdentity.Enabled +P:FSKit.FSModuleIdentity.IsSystem +P:FSKit.FSModuleIdentity.Url +P:FSKit.FSModuleIdentity.WeakAttributes +P:FSKit.FSModuleIdentityAttribute.ActivateOptionSyntax +P:FSKit.FSModuleIdentityAttribute.CheckOptionSyntax +P:FSKit.FSModuleIdentityAttribute.FormatOptionSyntax +P:FSKit.FSModuleIdentityAttribute.MediaTypes +P:FSKit.FSModuleIdentityAttribute.Personalities +P:FSKit.FSModuleIdentityAttribute.ShortName +P:FSKit.FSModuleIdentityAttribute.SupportsBlockResources +P:FSKit.FSModuleIdentityAttribute.SupportsKoio +P:FSKit.FSModuleIdentityAttribute.SupportsServerUrls +P:FSKit.FSModuleIdentityAttributes.ActivateOptionSyntax +P:FSKit.FSModuleIdentityAttributes.CheckOptionSyntax +P:FSKit.FSModuleIdentityAttributes.FormatOptionSyntax +P:FSKit.FSModuleIdentityAttributes.MediaTypes +P:FSKit.FSModuleIdentityAttributes.Personalities +P:FSKit.FSModuleIdentityAttributes.ShortName +P:FSKit.FSModuleIdentityAttributes.SupportsBlockResources +P:FSKit.FSModuleIdentityAttributes.SupportsKoio +P:FSKit.FSModuleIdentityAttributes.SupportsServerUrls +P:FSKit.FSProbeResult.ContainerId +P:FSKit.FSProbeResult.Name +P:FSKit.FSProbeResult.Result +P:FSKit.FSResource.IsRevoked +P:FSKit.FSStatFSResult.AvailableBlocks +P:FSKit.FSStatFSResult.AvailableBytes +P:FSKit.FSStatFSResult.BlockSize +P:FSKit.FSStatFSResult.FilesystemSubType +P:FSKit.FSStatFSResult.FilesystemTypeName +P:FSKit.FSStatFSResult.FreeBlocks +P:FSKit.FSStatFSResult.FreeBytes +P:FSKit.FSStatFSResult.FreeFiles +P:FSKit.FSStatFSResult.IoSize +P:FSKit.FSStatFSResult.TotalBlocks +P:FSKit.FSStatFSResult.TotalBytes +P:FSKit.FSStatFSResult.TotalFiles +P:FSKit.FSStatFSResult.UsedBlocks +P:FSKit.FSStatFSResult.UsedBytes +P:FSKit.FSUnaryFileSystem.ContainerState +P:FSKit.FSUnaryFileSystem.ErrorState +P:FSKit.FSUnaryItem.Queue +P:FSKit.FSVolume.Name +P:FSKit.FSVolume.VolumeId +P:FSKit.FSVolumeSupportedCapabilities.DoesNotSupportImmutableFiles +P:FSKit.FSVolumeSupportedCapabilities.DoesNotSupportRootTimes +P:FSKit.FSVolumeSupportedCapabilities.DoesNotSupportSettingFilePermissions +P:FSKit.FSVolumeSupportedCapabilities.DoesNotSupportVolumeSizes +P:FSKit.FSVolumeSupportedCapabilities.Supports2TBFiles +P:FSKit.FSVolumeSupportedCapabilities.Supports64BitObjectIds +P:FSKit.FSVolumeSupportedCapabilities.SupportsActiveJournal +P:FSKit.FSVolumeSupportedCapabilities.SupportsCasePreservingNames +P:FSKit.FSVolumeSupportedCapabilities.SupportsCaseSensitiveNames +P:FSKit.FSVolumeSupportedCapabilities.SupportsDocumentId +P:FSKit.FSVolumeSupportedCapabilities.SupportsFastStatFS +P:FSKit.FSVolumeSupportedCapabilities.SupportsHardLinks +P:FSKit.FSVolumeSupportedCapabilities.SupportsHiddenFiles +P:FSKit.FSVolumeSupportedCapabilities.SupportsJournal +P:FSKit.FSVolumeSupportedCapabilities.SupportsOpenDenyModes +P:FSKit.FSVolumeSupportedCapabilities.SupportsPersistentObjectIds +P:FSKit.FSVolumeSupportedCapabilities.SupportsSharedSpace +P:FSKit.FSVolumeSupportedCapabilities.SupportsSparseFiles +P:FSKit.FSVolumeSupportedCapabilities.SupportsSymbolicLinks +P:FSKit.FSVolumeSupportedCapabilities.SupportsVolumeGroups +P:FSKit.FSVolumeSupportedCapabilities.SupportsZeroRuns +P:FSKit.IFSFileSystemBase.ContainerState +P:FSKit.IFSFileSystemBase.ErrorState +P:FSKit.IFSVolumeAccessCheckOperations.AccessCheckOperationsInhibited +P:FSKit.IFSVolumeOperations.SupportedVolumeCapabilities +P:FSKit.IFSVolumeOperations.VolumeStatistics +P:FSKit.IFSVolumePathConfOperations.ChownRestricted +P:FSKit.IFSVolumePathConfOperations.LongNameTruncated +P:FSKit.IFSVolumePathConfOperations.MaxFileSizeInBits +P:FSKit.IFSVolumePathConfOperations.MaxLinkCount +P:FSKit.IFSVolumePathConfOperations.MaxNameLength +P:FSKit.IFSVolumePathConfOperations.MaxXattrSizeInBits +P:FSKit.IFSVolumePreallocateOperations.PreallocateOperationsInhibited +P:FSKit.IFSVolumeRenameOperations.VolumeRenameOperationsInhibited +P:FSKit.IFSVolumeXattrOperations.XattrOperationsInhibited P:GameController.GCColor.Blue P:GameController.GCColor.Green P:GameController.GCColor.Red @@ -80099,6 +80400,95 @@ T:Foundation.UNCDidActivateNotificationEventArgs T:Foundation.UNCDidDeliverNotificationEventArgs T:Foundation.UNCShouldPresentNotification T:Foundation.You_Should_Not_Call_base_In_This_Method +T:FSKit.FetchInstalledExtensionsCallback +T:FSKit.FSAccessMask +T:FSKit.FSBlockDeviceOperationsProbeResult +T:FSKit.FSBlockDeviceResource +T:FSKit.FSBlockDeviceResourceMetadataReplyHandler +T:FSKit.FSBlockDeviceResourceReadReplyHandler +T:FSKit.FSBlockDeviceResourceWriteReplyHandler +T:FSKit.FSBlockmapFlags +T:FSKit.FSClient +T:FSKit.FSConstants +T:FSKit.FSContainerIdentifier +T:FSKit.FSContainerState +T:FSKit.FSDeactivateOptions +T:FSKit.FSDirectoryEntryPacker +T:FSKit.FSEntityIdentifier +T:FSKit.FSExtentPacker +T:FSKit.FSExtentType +T:FSKit.FSFileName +T:FSKit.FSFileSystemBaseWipeResourceCompletionHandler +T:FSKit.FSGenericUrlResource +T:FSKit.FSItem +T:FSKit.FSItemAttribute +T:FSKit.FSItemAttributes +T:FSKit.FSItemGetAttributesRequest +T:FSKit.FSItemSetAttributesRequest +T:FSKit.FSItemType +T:FSKit.FSKitConstants +T:FSKit.FSKitFunctions +T:FSKit.FSManageableResourceMaintenanceOperationsHandler +T:FSKit.FSMatchResult +T:FSKit.FSMessageConnection +T:FSKit.FSMessageConnectionDidCompleteHandler +T:FSKit.FSMetadataBlockRange +T:FSKit.FSMetadataReadahead +T:FSKit.FSModuleIdentity +T:FSKit.FSModuleIdentityAttribute +T:FSKit.FSModuleIdentityAttributes +T:FSKit.FSPreallocateFlags +T:FSKit.FSProbeResult +T:FSKit.FSResource +T:FSKit.FSSetXattrPolicy +T:FSKit.FSStatFSResult +T:FSKit.FSUnaryFileSystem +T:FSKit.FSUnaryFileSystemOperationsLoadResourceResult +T:FSKit.FSUnaryItem +T:FSKit.FSVolume +T:FSKit.FSVolumeAccessCheckOperationsCheckAccessHandler +T:FSKit.FSVolumeErrorCode +T:FSKit.FSVolumeIdentifier +T:FSKit.FSVolumeKoioOperationsCreateFileHandler +T:FSKit.FSVolumeKoioOperationsHandler +T:FSKit.FSVolumeKoioOperationsLookupItemHandler +T:FSKit.FSVolumeOpenCloseOperationsHandler +T:FSKit.FSVolumeOpenModes +T:FSKit.FSVolumeOperationsActivateHandler +T:FSKit.FSVolumeOperationsAttributesHandler +T:FSKit.FSVolumeOperationsCreateItemHandler +T:FSKit.FSVolumeOperationsCreateLinkHandler +T:FSKit.FSVolumeOperationsDeactivateHandler +T:FSKit.FSVolumeOperationsEnumerateDirectoryHandler +T:FSKit.FSVolumeOperationsLookupItemHandler +T:FSKit.FSVolumeOperationsMountHandler +T:FSKit.FSVolumeOperationsReadSymbolicLinkHandler +T:FSKit.FSVolumeOperationsReclaimHandler +T:FSKit.FSVolumeOperationsRemoveItemHandler +T:FSKit.FSVolumeOperationsRenameItemHandler +T:FSKit.FSVolumeOperationsSynchronizeHandler +T:FSKit.FSVolumePreallocateOperationsHandler +T:FSKit.FSVolumeReadWriteOperationsReadHandler +T:FSKit.FSVolumeReadWriteOperationsWriteHandler +T:FSKit.FSVolumeRenameOperationsSetVolumeNameHandler +T:FSKit.FSVolumeSupportedCapabilities +T:FSKit.FSVolumeXattrOperationsGetHandler +T:FSKit.FSVolumeXattrOperationsListHandler +T:FSKit.FSVolumeXattrOperationsSetHandler +T:FSKit.IFSBlockDeviceOperations +T:FSKit.IFSFileSystemBase +T:FSKit.IFSManageableResourceMaintenanceOperations +T:FSKit.IFSUnaryFileSystemOperations +T:FSKit.IFSVolumeAccessCheckOperations +T:FSKit.IFSVolumeKoioOperations +T:FSKit.IFSVolumeOpenCloseOperations +T:FSKit.IFSVolumeOperations +T:FSKit.IFSVolumePathConfOperations +T:FSKit.IFSVolumePreallocateOperations +T:FSKit.IFSVolumeReadWriteOperations +T:FSKit.IFSVolumeRenameOperations +T:FSKit.IFSVolumeXattrOperations +T:FSKit.NSUuid_FSEntityIdentifier T:GameController.ElementValueDidChangeHandler T:GameController.GCAcceleration T:GameController.GCColor diff --git a/tests/cecil-tests/PreviewApi.cs b/tests/cecil-tests/PreviewApi.cs index a8311375f29d..36f86ea3fcea 100644 --- a/tests/cecil-tests/PreviewApi.cs +++ b/tests/cecil-tests/PreviewApi.cs @@ -17,30 +17,33 @@ namespace Cecil.Tests { [TestFixture] public class PreviewApi { [TestCase ("CryptoTokenKit", "APL0001", "10.0")] + [TestCase ("FSKit", "APL0002", "11.0")] public void EverythingInNamespace (string ns, string expectedDiagnosticId, string stableInDotNetVersion) { // Verify that all types in the given namespace have an Experimental attribute. var failures = new HashSet (); var isAttributeExpected = Version.Parse (Configuration.DotNetTfm.Replace ("net", "")) < Version.Parse (stableInDotNetVersion); + var typesInNamespace = new List (); foreach (var info in Helper.NetPlatformImplementationAssemblyDefinitions) { - var typesInNamespace = info.Assembly.EnumerateTypes (t => t.Namespace == ns).ToArray (); - if (typesInNamespace.Length == 0) - failures.Add ($"No types found for the namespace {ns}, something is very wrong somewhere."); - foreach (var type in typesInNamespace) { - var hasAttribute = TryGetExperimentalAttribute (type, out var diagnosticId); + typesInNamespace.AddRange (info.Assembly.EnumerateTypes (t => t.Namespace == ns)); + } + + if (typesInNamespace.Count == 0) + failures.Add ($"No types found for the namespace {ns}, something is very wrong somewhere."); + foreach (var type in typesInNamespace) { + var hasAttribute = TryGetExperimentalAttribute (type, out var diagnosticId); - if (isAttributeExpected) { - if (hasAttribute) { - if (diagnosticId != expectedDiagnosticId) - failures.Add ($"The type '{type.FullName}' has the [Experimental] attribute as expected, but the diagnostic id is incorrect (expected '{expectedDiagnosticId}', actual '{diagnosticId}')"); - } else { - failures.Add ($"The type '{type.FullName}' is supposed to be in preview in until .NET {stableInDotNetVersion}, but it does not have an [Experimental] attribute."); - } + if (isAttributeExpected) { + if (hasAttribute) { + if (diagnosticId != expectedDiagnosticId) + failures.Add ($"The type '{type.FullName}' has the [Experimental] attribute as expected, but the diagnostic id is incorrect (expected '{expectedDiagnosticId}', actual '{diagnosticId}')"); } else { - if (hasAttribute) - failures.Add ($"The type '{type.FullName}' is supposed to be stable in .NET {stableInDotNetVersion}, but it has an [Experimental] attribute."); + failures.Add ($"The type '{type.FullName}' is supposed to be in preview in until .NET {stableInDotNetVersion}, but it does not have an [Experimental] attribute."); } + } else { + if (hasAttribute) + failures.Add ($"The type '{type.FullName}' is supposed to be stable in .NET {stableInDotNetVersion}, but it has an [Experimental] attribute."); } } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.ignore new file mode 100644 index 000000000000..d447a7da3995 --- /dev/null +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.ignore @@ -0,0 +1,12 @@ +## There's no documentation on what the '[long]ByteQualifier' pointer is, so wait with the binding for it. +!missing-selector! +FSEntityIdentifier::identifierWithUUID:byteQualifier: not bound +!missing-selector! +FSEntityIdentifier::identifierWithUUID:longByteQualifier: not bound +!missing-selector! FSEntityIdentifier::initWithUUID:byteQualifier: not bound +!missing-selector! FSEntityIdentifier::initWithUUID:longByteQualifier: not bound + +## The C# binding for this ends up being the same as the the nameWithString: selector, which we've already bound. +!missing-selector! +FSFileName::nameWithCString: not bound +!missing-selector! FSFileName::initWithCString: not bound + +## debugDescripion is already bound on NSObject +!missing-selector! FSFileName::debugDescription not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.todo deleted file mode 100644 index 5cae303b34f7..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.todo +++ /dev/null @@ -1,256 +0,0 @@ -!missing-selector! +FSEntityIdentifier::identifierWithUUID:byteQualifier: not bound -!missing-selector! +FSEntityIdentifier::identifierWithUUID:longByteQualifier: not bound -!missing-selector! +FSFileName::nameWithCString: not bound -!missing-selector! +FSProbeResult::resultWithResult:name:containerID: not bound -!missing-selector! FSEntityIdentifier::initWithUUID:byteQualifier: not bound -!missing-selector! FSEntityIdentifier::initWithUUID:longByteQualifier: not bound -!missing-selector! FSFileName::debugDescription not bound -!missing-selector! FSFileName::initWithCString: not bound -!missing-selector! FSProbeResult::containerID not bound -!missing-selector! FSProbeResult::name not bound -!missing-selector! FSProbeResult::result not bound -!missing-type! FSProbeResult not bound -!missing-enum! FSContainerState not bound -!missing-enum! FSExtentType not bound -!missing-enum! FSItemType not bound -!missing-enum! FSMatchResult not bound -!missing-field! FSKitVersionNumber not bound -!missing-field! FSKitVersionString not bound -!missing-pinvoke! fs_errorForCocoaError is not bound -!missing-pinvoke! fs_errorForMachError is not bound -!missing-pinvoke! fs_errorForPOSIXError is not bound -!missing-pinvoke! fskit_std_log is not bound -!missing-protocol! FSBlockDeviceOperations not bound -!missing-protocol! FSFileSystemBase not bound -!missing-protocol! FSUnaryFileSystemOperations not bound -!missing-protocol! FSVolumeAccessCheckOperations not bound -!missing-protocol! FSVolumeOpenCloseOperations not bound -!missing-protocol! FSVolumeOperations not bound -!missing-protocol! FSVolumePathConfOperations not bound -!missing-protocol! FSVolumePreallocateOperations not bound -!missing-protocol! FSVolumeReadWriteOperations not bound -!missing-protocol! FSVolumeRenameOperations not bound -!missing-protocol! FSVolumeXattrOperations not bound -!missing-selector! +FSBlockDeviceResource::proxyResourceForBSDName: not bound -!missing-selector! +FSEntityIdentifier::identifier not bound -!missing-selector! +FSEntityIdentifier::identifierWithUUID: not bound -!missing-selector! +FSEntityIdentifier::identifierWithUUID:data: not bound -!missing-selector! +FSFileName::nameWithBytes:length: not bound -!missing-selector! +FSFileName::nameWithData: not bound -!missing-selector! +FSFileName::nameWithString: not bound -!missing-selector! FSBlockDeviceResource::blockCount not bound -!missing-selector! FSBlockDeviceResource::blockSize not bound -!missing-selector! FSBlockDeviceResource::physicalBlockSize not bound -!missing-selector! FSBlockDeviceResource::readInto:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousReadInto:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousWriteFrom:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::writeFrom:startingAt:length:replyHandler: not bound -!missing-selector! FSContainerIdentifier::volumeIdentifier not bound -!missing-selector! FSEntityIdentifier::init not bound -!missing-selector! FSEntityIdentifier::initWithUUID: not bound -!missing-selector! FSEntityIdentifier::initWithUUID:data: not bound -!missing-selector! FSEntityIdentifier::setUuid: not bound -!missing-selector! FSEntityIdentifier::uuid not bound -!missing-selector! FSFileName::data not bound -!missing-selector! FSFileName::initWithBytes:length: not bound -!missing-selector! FSFileName::initWithData: not bound -!missing-selector! FSFileName::initWithString: not bound -!missing-selector! FSFileName::string not bound -!missing-selector! FSItemAttributes::allocSize not bound -!missing-selector! FSItemAttributes::gid not bound -!missing-selector! FSItemAttributes::mode not bound -!missing-selector! FSItemAttributes::setAccessTime: not bound -!missing-selector! FSItemAttributes::setAddedTime: not bound -!missing-selector! FSItemAttributes::setAllocSize: not bound -!missing-selector! FSItemAttributes::setBackupTime: not bound -!missing-selector! FSItemAttributes::setBirthTime: not bound -!missing-selector! FSItemAttributes::setChangeTime: not bound -!missing-selector! FSItemAttributes::setGid: not bound -!missing-selector! FSItemAttributes::setMode: not bound -!missing-selector! FSItemAttributes::setModifyTime: not bound -!missing-selector! FSItemAttributes::setSize: not bound -!missing-selector! FSItemAttributes::setSupportsLimitedXAttrs: not bound -!missing-selector! FSItemAttributes::setType: not bound -!missing-selector! FSItemAttributes::setUid: not bound -!missing-selector! FSItemAttributes::size not bound -!missing-selector! FSItemAttributes::supportsLimitedXAttrs not bound -!missing-selector! FSItemAttributes::type not bound -!missing-selector! FSItemAttributes::uid not bound -!missing-selector! FSModuleIdentity::attributes not bound -!missing-selector! FSModuleIdentity::bundleIdentifier not bound -!missing-selector! FSModuleIdentity::isEnabled not bound -!missing-selector! FSModuleIdentity::isSystem not bound -!missing-selector! FSModuleIdentity::url not bound -!missing-selector! FSUnaryItem::queue not bound -!missing-selector! FSVolume::volumeID not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupports2TBFiles: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupports64BitObjectIDs: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsDocumentID: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsFastStatFS: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsHardLinks: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsHiddenFiles: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsJournal: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsOpenDenyModes: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsPersistentObjectIDs: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsSharedSpace: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsSparseFiles: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsVolumeGroups: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsZeroRuns: not bound -!missing-selector! FSVolumeSupportedCapabilities::supports2TBFiles not bound -!missing-selector! FSVolumeSupportedCapabilities::supports64BitObjectIDs not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsDocumentID not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsFastStatFS not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsHardLinks not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsHiddenFiles not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsJournal not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsOpenDenyModes not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsPersistentObjectIDs not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsSharedSpace not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsSparseFiles not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsVolumeGroups not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsZeroRuns not bound -!missing-selector! NSUUID::fs_containerIdentifier not bound -!missing-selector! NSUUID::fs_entityIdentifier not bound -!missing-selector! NSUUID::fs_volumeIdentifier not bound -!missing-type! FSBlockDeviceResource not bound -!missing-type! FSClient not bound -!missing-type! FSContainerIdentifier not bound -!missing-type! FSEntityIdentifier not bound -!missing-type! FSFileName not bound -!missing-type! FSItem not bound -!missing-type! FSItemAttributes not bound -!missing-type! FSItemGetAttributesRequest not bound -!missing-type! FSItemSetAttributesRequest not bound -!missing-type! FSMessageConnection not bound -!missing-type! FSModuleIdentity not bound -!missing-type! FSResource not bound -!missing-type! FSUnaryFileSystem not bound -!missing-type! FSUnaryItem not bound -!missing-type! FSVolume not bound -!missing-type! FSVolumeIdentifier not bound -!missing-type! FSVolumeSupportedCapabilities not bound -!missing-enum! FSAccessMask not bound -!missing-enum! FSBlockmapFlags not bound -!missing-enum! FSDeactivateOptions not bound -!missing-enum! FSItemAttribute not bound -!missing-enum! FSPreallocateFlags not bound -!missing-enum! FSSetXattrPolicy not bound -!missing-enum! FSVolumeErrorCode not bound -!missing-enum! FSVolumeOpenModes not bound -!missing-field! FSDirectoryCookieInitial not bound -!missing-field! FSDirectoryVerifierInitial not bound -!missing-field! FSModuleIdentityAttributeActivateOptionSyntax not bound -!missing-field! FSModuleIdentityAttributeCheckOptionSyntax not bound -!missing-field! FSModuleIdentityAttributeFormatOptionSyntax not bound -!missing-field! FSModuleIdentityAttributeMediaTypes not bound -!missing-field! FSModuleIdentityAttributePersonalities not bound -!missing-field! FSModuleIdentityAttributeShortName not bound -!missing-field! FSModuleIdentityAttributeSupportsBlockResources not bound -!missing-field! FSModuleIdentityAttributeSupportsKOIO not bound -!missing-field! FSModuleIdentityAttributeSupportsServerURLs not bound -!missing-field! FSVolumeErrorDomain not bound -!missing-protocol! FSManageableResourceMaintenanceOperations not bound -!missing-protocol! FSVolumeKOIOOperations not bound -!missing-selector! +FSBlockDeviceResource::proxyResourceForBSDName:isWritable: not bound -!missing-selector! +FSClient::fetchInstalledExtensionsWithCompletionHandler: not bound -!missing-selector! +FSClient::installedExtensionsWithError: not bound -!missing-selector! +FSGenericURLResource::resourceWithURL: not bound -!missing-selector! +FSMetadataBlockRange::rangeWithOffset:blockLength:numberOfBlocks: not bound -!missing-selector! FSBlockDeviceResource::BSDName not bound -!missing-selector! FSBlockDeviceResource::delayedMetadataWriteFrom:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::isTerminated not bound -!missing-selector! FSBlockDeviceResource::isWritable not bound -!missing-selector! FSBlockDeviceResource::metadataWriteFrom:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataClear:wait:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataFlushWithReplyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataPurge:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataReadInto:startingAt:length:readAheadExtents:readAheadCount:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataReadInto:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::synchronousMetadataWriteFrom:startingAt:length:replyHandler: not bound -!missing-selector! FSBlockDeviceResource::terminate not bound -!missing-selector! FSEntityIdentifier::qualifier not bound -!missing-selector! FSEntityIdentifier::setQualifier: not bound -!missing-selector! FSGenericURLResource::URL not bound -!missing-selector! FSItemAttributes::accessTime not bound -!missing-selector! FSItemAttributes::addedTime not bound -!missing-selector! FSItemAttributes::backupTime not bound -!missing-selector! FSItemAttributes::birthTime not bound -!missing-selector! FSItemAttributes::changeTime not bound -!missing-selector! FSItemAttributes::fileID not bound -!missing-selector! FSItemAttributes::flags not bound -!missing-selector! FSItemAttributes::inhibitKOIO not bound -!missing-selector! FSItemAttributes::invalidateAllProperties not bound -!missing-selector! FSItemAttributes::isValid: not bound -!missing-selector! FSItemAttributes::linkCount not bound -!missing-selector! FSItemAttributes::modifyTime not bound -!missing-selector! FSItemAttributes::parentID not bound -!missing-selector! FSItemAttributes::setFileID: not bound -!missing-selector! FSItemAttributes::setFlags: not bound -!missing-selector! FSItemAttributes::setInhibitKOIO: not bound -!missing-selector! FSItemAttributes::setLinkCount: not bound -!missing-selector! FSItemAttributes::setParentID: not bound -!missing-selector! FSItemGetAttributesRequest::isWanted: not bound -!missing-selector! FSItemGetAttributesRequest::setWantedAttributes: not bound -!missing-selector! FSItemGetAttributesRequest::wantedAttributes not bound -!missing-selector! FSItemSetAttributesRequest::consumedAttributes not bound -!missing-selector! FSItemSetAttributesRequest::setConsumedAttributes: not bound -!missing-selector! FSItemSetAttributesRequest::wasConsumed: not bound -!missing-selector! FSMessageConnection::didCompleteWithError:completionHandler: not bound -!missing-selector! FSMessageConnection::logMessage: not bound -!missing-selector! FSMetadataBlockRange::blockLength not bound -!missing-selector! FSMetadataBlockRange::initWithOffset:blockLength:numberOfBlocks: not bound -!missing-selector! FSMetadataBlockRange::numberOfBlocks not bound -!missing-selector! FSMetadataBlockRange::startBlockOffset not bound -!missing-selector! FSResource::isRevoked not bound -!missing-selector! FSResource::makeProxy not bound -!missing-selector! FSResource::revoke not bound -!missing-selector! FSStatFSResult::availableBlocks not bound -!missing-selector! FSStatFSResult::availableBytes not bound -!missing-selector! FSStatFSResult::blockSize not bound -!missing-selector! FSStatFSResult::filesystemSubType not bound -!missing-selector! FSStatFSResult::filesystemTypeName not bound -!missing-selector! FSStatFSResult::freeBlocks not bound -!missing-selector! FSStatFSResult::freeBytes not bound -!missing-selector! FSStatFSResult::freeFiles not bound -!missing-selector! FSStatFSResult::initWithFSTypeName: not bound -!missing-selector! FSStatFSResult::ioSize not bound -!missing-selector! FSStatFSResult::setAvailableBlocks: not bound -!missing-selector! FSStatFSResult::setAvailableBytes: not bound -!missing-selector! FSStatFSResult::setBlockSize: not bound -!missing-selector! FSStatFSResult::setFilesystemSubType: not bound -!missing-selector! FSStatFSResult::setFreeBlocks: not bound -!missing-selector! FSStatFSResult::setFreeBytes: not bound -!missing-selector! FSStatFSResult::setFreeFiles: not bound -!missing-selector! FSStatFSResult::setIoSize: not bound -!missing-selector! FSStatFSResult::setTotalBlocks: not bound -!missing-selector! FSStatFSResult::setTotalBytes: not bound -!missing-selector! FSStatFSResult::setTotalFiles: not bound -!missing-selector! FSStatFSResult::setUsedBlocks: not bound -!missing-selector! FSStatFSResult::setUsedBytes: not bound -!missing-selector! FSStatFSResult::totalBlocks not bound -!missing-selector! FSStatFSResult::totalBytes not bound -!missing-selector! FSStatFSResult::totalFiles not bound -!missing-selector! FSStatFSResult::usedBlocks not bound -!missing-selector! FSStatFSResult::usedBytes not bound -!missing-selector! FSVolume::initWithVolumeID:volumeName: not bound -!missing-selector! FSVolume::name not bound -!missing-selector! FSVolume::setName: not bound -!missing-selector! FSVolumeSupportedCapabilities::doesNotSupportImmutableFiles not bound -!missing-selector! FSVolumeSupportedCapabilities::doesNotSupportRootTimes not bound -!missing-selector! FSVolumeSupportedCapabilities::doesNotSupportSettingFilePermissions not bound -!missing-selector! FSVolumeSupportedCapabilities::doesNotSupportVolumeSizes not bound -!missing-selector! FSVolumeSupportedCapabilities::setDoesNotSupportImmutableFiles: not bound -!missing-selector! FSVolumeSupportedCapabilities::setDoesNotSupportRootTimes: not bound -!missing-selector! FSVolumeSupportedCapabilities::setDoesNotSupportSettingFilePermissions: not bound -!missing-selector! FSVolumeSupportedCapabilities::setDoesNotSupportVolumeSizes: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsActiveJournal: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsCasePreservingNames: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsCaseSensitiveNames: not bound -!missing-selector! FSVolumeSupportedCapabilities::setSupportsSymbolicLinks: not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsActiveJournal not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsCasePreservingNames not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsCaseSensitiveNames not bound -!missing-selector! FSVolumeSupportedCapabilities::supportsSymbolicLinks not bound -!missing-type! FSGenericURLResource not bound -!missing-type! FSMetadataBlockRange not bound -!missing-type! FSStatFSResult not bound diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index abc26aa427af..93ab177ba9cf 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -290,6 +290,8 @@ public static Frameworks MacFrameworks { { "Cinematic", "Cinematic", 14,0 }, { "Symbols", "Symbols", 14, 0 }, { "SensitiveContentAnalysis", "SensitiveContentAnalysis", 14, 0 }, + + { "FSKit", "FSKit", 15, 0 }, }; } return mac_frameworks;