Documentation
¶
Overview ¶
Package fileprovider provides purego-based Go bindings for the macOS FileProvider framework.
Apple documentation: https://developer.apple.com/documentation/fileprovider
Index ¶
- func NSFileProviderDomainDidChange() *foundation.NSString
- func NSFileProviderErrorDomain() *foundation.NSString
- func NSFileProviderErrorItemKey() uintptr
- func NSFileProviderErrorNonExistentItemIdentifierKey() *foundation.NSString
- func NSFileProviderFavoriteRankUnranked() uintptr
- func NSFileProviderInitialPageSortedByDate() *foundation.NSData
- func NSFileProviderInitialPageSortedByName() *foundation.NSData
- func NSFileProviderItemVersionBeforeFirstSyncComponent() *foundation.NSData
- func NSFileProviderManagerAddDomainCompletionHandler(domain *NSFileProviderDomain, completionHandler func(unsafe.Pointer))
- func NSFileProviderManagerCheckDomainsCanBeStoredOnVolumeAtURLUnsupportedReasonError(eligible *bool, url *foundation.NSURL, ...) (bool, error)
- func NSFileProviderManagerGetDomainsWithCompletionHandler(...)
- func NSFileProviderManagerGetIdentifierForUserVisibleFileAtURLCompletionHandler(url *foundation.NSURL, ...)
- func NSFileProviderManagerImportDomainFromDirectoryAtURLCompletionHandler(domain *NSFileProviderDomain, url *foundation.NSURL, ...)
- func NSFileProviderManagerRemoveAllDomainsWithCompletionHandler(completionHandler func(unsafe.Pointer))
- func NSFileProviderManagerRemoveDomainCompletionHandler(domain *NSFileProviderDomain, completionHandler func(unsafe.Pointer))
- func NSFileProviderManagerRemoveDomainModeCompletionHandler(domain *NSFileProviderDomain, mode NSFileProviderDomainRemovalMode, ...)
- func NSFileProviderMaterializedSetDidChange() *foundation.NSString
- func NSFileProviderPendingSetDidChange() *foundation.NSString
- func NSFileProviderRootContainerItemIdentifier() uintptr
- func NSFileProviderTrashContainerItemIdentifier() uintptr
- func NSFileProviderUserInfoExperimentIDKey() uintptr
- func NSFileProviderWorkingSetContainerItemIdentifier() uintptr
- type Acl_entry_id_t
- type Acl_flag_t
- type Acl_perm_t
- type Acl_tag_t
- type Acl_type_t
- type Clockid_t
- type Dispatch_autorelease_frequency_t
- type Dispatch_block_flags_t
- type EvCmd
- type Filesec_property_t
- type Idtype_t
- type Ipc_info_object_type_t
- type Launch_data_type_t
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type Mach_vm_range_flags_t
- type Mach_vm_range_flavor_t
- type Mach_vm_range_tag_t
- type Mpo_flags_t
- type NSFileProviderChangeObserver
- type NSFileProviderContentPolicy
- type NSFileProviderCreateItemOptions
- type NSFileProviderCustomAction
- type NSFileProviderDeleteItemOptions
- type NSFileProviderDomain
- func (o *NSFileProviderDomain) BackingStoreIdentity() *foundation.NSData
- func (o *NSFileProviderDomain) DisplayName() *foundation.NSString
- func (o *NSFileProviderDomain) Identifier() *foundation.NSString
- func (o *NSFileProviderDomain) InitWithDisplayNameUserInfoVolumeURL(displayName *foundation.NSString, ...) *NSFileProviderDomain
- func (o *NSFileProviderDomain) InitWithIdentifierDisplayName(identifier *foundation.NSString, displayName *foundation.NSString) *NSFileProviderDomain
- func (o *NSFileProviderDomain) IsDisconnected() bool
- func (o *NSFileProviderDomain) IsHidden() bool
- func (o *NSFileProviderDomain) IsReplicated() bool
- func (o *NSFileProviderDomain) ReplicatedKnownFolders() NSFileProviderKnownFolders
- func (o *NSFileProviderDomain) SetHidden(hidden bool)
- func (o *NSFileProviderDomain) SetSupportedKnownFolders(supportedKnownFolders NSFileProviderKnownFolders)
- func (o *NSFileProviderDomain) SetSupportsStringSearchRequest(supportsStringSearchRequest bool)
- func (o *NSFileProviderDomain) SetSupportsSyncingTrash(supportsSyncingTrash bool)
- func (o *NSFileProviderDomain) SetTestingModes(testingModes NSFileProviderDomainTestingModes)
- func (o *NSFileProviderDomain) SetUserInfo(userInfo *foundation.NSDictionary[objc.ID, objc.ID])
- func (o *NSFileProviderDomain) SupportedKnownFolders() NSFileProviderKnownFolders
- func (o *NSFileProviderDomain) SupportsStringSearchRequest() bool
- func (o *NSFileProviderDomain) SupportsSyncingTrash() bool
- func (o *NSFileProviderDomain) TestingModes() NSFileProviderDomainTestingModes
- func (o *NSFileProviderDomain) UserEnabled() bool
- func (o *NSFileProviderDomain) UserInfo() *foundation.NSDictionary[objc.ID, objc.ID]
- func (o *NSFileProviderDomain) VolumeUUID() *foundation.NSUUID
- type NSFileProviderDomainRemovalMode
- type NSFileProviderDomainState
- type NSFileProviderDomainTestingModes
- type NSFileProviderDomainVersion
- type NSFileProviderEnumerating
- type NSFileProviderEnumerationObserver
- type NSFileProviderEnumerator
- type NSFileProviderErrorCode
- type NSFileProviderExternalVolumeHandling
- type NSFileProviderFetchContentsOptions
- type NSFileProviderFileSystemFlags
- type NSFileProviderIncrementalContentFetching
- type NSFileProviderItem
- type NSFileProviderItemCapabilities
- type NSFileProviderItemDecorating
- type NSFileProviderItemFields
- type NSFileProviderItemVersion
- func (o *NSFileProviderItemVersion) ContentVersion() *foundation.NSData
- func (o *NSFileProviderItemVersion) InitWithContentVersionMetadataVersion(contentVersion *foundation.NSData, metadataVersion *foundation.NSData) *NSFileProviderItemVersion
- func (o *NSFileProviderItemVersion) MetadataVersion() *foundation.NSData
- type NSFileProviderKnownFolderLocation
- func (o *NSFileProviderKnownFolderLocation) InitWithExistingItemIdentifier(existingItemIdentifier *foundation.NSString) *NSFileProviderKnownFolderLocation
- func (o *NSFileProviderKnownFolderLocation) InitWithParentItemIdentifierFilename(parentItemIdentifier *foundation.NSString, filename *foundation.NSString) *NSFileProviderKnownFolderLocation
- type NSFileProviderKnownFolderLocations
- func (o *NSFileProviderKnownFolderLocations) DesktopLocation() *NSFileProviderKnownFolderLocation
- func (o *NSFileProviderKnownFolderLocations) DocumentsLocation() *NSFileProviderKnownFolderLocation
- func (o *NSFileProviderKnownFolderLocations) Init() *NSFileProviderKnownFolderLocations
- func (o *NSFileProviderKnownFolderLocations) SetDesktopLocation(desktopLocation *NSFileProviderKnownFolderLocation)
- func (o *NSFileProviderKnownFolderLocations) SetDocumentsLocation(documentsLocation *NSFileProviderKnownFolderLocation)
- func (o *NSFileProviderKnownFolderLocations) SetShouldCreateBinaryCompatibilitySymlink(shouldCreateBinaryCompatibilitySymlink bool)
- func (o *NSFileProviderKnownFolderLocations) ShouldCreateBinaryCompatibilitySymlink() bool
- type NSFileProviderKnownFolderSupporting
- type NSFileProviderKnownFolders
- type NSFileProviderManager
- func (o *NSFileProviderManager) ClaimKnownFoldersLocalizedReasonCompletionHandler(knownFolders *NSFileProviderKnownFolderLocations, ...)
- func (o *NSFileProviderManager) DisconnectWithReasonOptionsCompletionHandler(localizedReason *foundation.NSString, ...)
- func (o *NSFileProviderManager) EnumeratorForMaterializedItems() NSFileProviderEnumerator
- func (o *NSFileProviderManager) EnumeratorForPendingItems() NSFileProviderPendingSetEnumerator
- func (o *NSFileProviderManager) EvictItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
- func (o *NSFileProviderManager) GetServiceWithNameItemIdentifierCompletionHandler(serviceName *foundation.NSString, itemIdentifier *foundation.NSString, ...)
- func (o *NSFileProviderManager) GetUserVisibleURLForItemIdentifierCompletionHandler(itemIdentifier *foundation.NSString, ...)
- func (o *NSFileProviderManager) GlobalProgressForKind(kind *foundation.NSString) *foundation.NSProgress
- func (o *NSFileProviderManager) ListAvailableTestingOperationsWithError() (*foundation.NSArray[NSFileProviderTestingOperation], error)
- func (o *NSFileProviderManager) ReconnectWithCompletionHandler(completionHandler func(unsafe.Pointer))
- func (o *NSFileProviderManager) RegisterURLSessionTaskForItemWithIdentifierCompletionHandler(task *foundation.NSURLSessionTask, identifier *foundation.NSString, ...)
- func (o *NSFileProviderManager) ReimportItemsBelowItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
- func (o *NSFileProviderManager) ReleaseKnownFoldersLocalizedReasonCompletionHandler(knownFolders NSFileProviderKnownFolders, localizedReason *foundation.NSString, ...)
- func (o *NSFileProviderManager) RequestDiagnosticCollectionForItemWithIdentifierErrorReasonCompletionHandler(itemIdentifier *foundation.NSString, errorReason unsafe.Pointer, ...)
- func (o *NSFileProviderManager) RequestDownloadForItemWithIdentifierRequestedRangeCompletionHandler(itemIdentifier *foundation.NSString, rangeToMaterialize foundation.NSRange, ...)
- func (o *NSFileProviderManager) RunTestingOperationsError(operations *foundation.NSArray[NSFileProviderTestingOperation]) (*foundation.NSDictionary[NSFileProviderTestingOperation, objc.ID], error)
- func (o *NSFileProviderManager) SignalEnumeratorForContainerItemIdentifierCompletionHandler(containerItemIdentifier *foundation.NSString, completion func(unsafe.Pointer))
- func (o *NSFileProviderManager) SignalErrorResolvedCompletionHandler(error_ unsafe.Pointer, completionHandler func(unsafe.Pointer))
- func (o *NSFileProviderManager) StateDirectoryURLWithError() (*foundation.NSURL, error)
- func (o *NSFileProviderManager) TemporaryDirectoryURLWithError() (*foundation.NSURL, error)
- func (o *NSFileProviderManager) WaitForChangesOnItemsBelowItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
- func (o *NSFileProviderManager) WaitForStabilizationWithCompletionHandler(completionHandler func(unsafe.Pointer))
- type NSFileProviderManagerDisconnectionOptions
- type NSFileProviderMaterializationFlags
- type NSFileProviderModifyItemOptions
- type NSFileProviderPartialContentFetching
- type NSFileProviderPendingSetEnumerator
- type NSFileProviderReplicatedExtension
- type NSFileProviderRequest
- type NSFileProviderSearchEnumerationObserver
- type NSFileProviderSearchEnumerator
- type NSFileProviderSearchResult
- type NSFileProviderSearching
- type NSFileProviderServiceSource
- type NSFileProviderServicing
- type NSFileProviderStringSearchRequest
- type NSFileProviderTestingChildrenEnumeration
- type NSFileProviderTestingCollisionResolution
- type NSFileProviderTestingContentFetch
- type NSFileProviderTestingCreation
- type NSFileProviderTestingDeletion
- type NSFileProviderTestingIngestion
- type NSFileProviderTestingLookup
- type NSFileProviderTestingModification
- type NSFileProviderTestingOperation
- type NSFileProviderTestingOperationSide
- type NSFileProviderTestingOperationType
- type NSFileProviderThumbnailing
- type NSFileProviderTypeAndCreator
- type NSFileProviderUserInteractionSuppressing
- type NSFileProviderVolumeUnsupportedReason
- type NXMouseButton
- type Os_clockid_t
- type Ptrauth_key
- type Qos_class_t
- type Virtual_memory_guard_exception_code_t
- type Xpc_listener_create_flags_t
- type Xpc_session_create_flags_t
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NSFileProviderDomainDidChange ¶
func NSFileProviderDomainDidChange() *foundation.NSString
Posted when any domain changed. Interested client should then call `+[NSFileProviderManager getDomainsWithCompletionHandler:]` and see what changed. Note, this notification starts to be posted only after `+[NSFileProviderManager getDomainsWithCompletionHandler:]` is called.
func NSFileProviderErrorDomain ¶
func NSFileProviderErrorDomain() *foundation.NSString
func NSFileProviderErrorItemKey ¶
func NSFileProviderErrorItemKey() uintptr
func NSFileProviderErrorNonExistentItemIdentifierKey ¶
func NSFileProviderErrorNonExistentItemIdentifierKey() *foundation.NSString
func NSFileProviderFavoriteRankUnranked ¶
func NSFileProviderFavoriteRankUnranked() uintptr
A special value for favorite ranks, to use when no rank was set when the item was favorited.
func NSFileProviderInitialPageSortedByDate ¶
func NSFileProviderInitialPageSortedByDate() *foundation.NSData
func NSFileProviderInitialPageSortedByName ¶
func NSFileProviderInitialPageSortedByName() *foundation.NSData
func NSFileProviderItemVersionBeforeFirstSyncComponent ¶
func NSFileProviderItemVersionBeforeFirstSyncComponent() *foundation.NSData
Version component exposed by the system to denote a state that predates a version returned by the provider. In case an item was created by calling `createItemBasedOnTemplate` and the item returned by the provider in the completion handler of that call didn't match the item template passed by the system, the system will try to apply the changes asked by the provider to the disk. However, the system may detect conflicts when applying those content back to the disk, which will cause the system to send the new disk version to the extension, by calling `modifyItem` or `deleteItemWithIdentifier` with a `baseVersion` that represents the item as passed in the template of the `createItemBasedOnTemplate` call. This constant is used by the system to represent that specific version that was communicated by the system to the extension but does not have a corresponding version assigned by the extension.
func NSFileProviderManagerAddDomainCompletionHandler ¶
func NSFileProviderManagerAddDomainCompletionHandler(domain *NSFileProviderDomain, completionHandler func(unsafe.Pointer))
Register a domain in which items can be stored. If a domain with the same identifier already exists, `addDomain` will update the display name and hidden state of the domain and succeed. When the domain is backed by a NSFileProviderReplicatedExtension, the system will create a disk location where the domain will be replicated. If that location already exists on disk this call will fail with the code NSFileWriteFileExistsError.
func NSFileProviderManagerCheckDomainsCanBeStoredOnVolumeAtURLUnsupportedReasonError ¶
func NSFileProviderManagerCheckDomainsCanBeStoredOnVolumeAtURLUnsupportedReasonError(eligible *bool, url *foundation.NSURL, unsupportedReason *NSFileProviderVolumeUnsupportedReason) (bool, error)
Check if a URL is eligible for storing a domain. This returns whether the check has been performed succesfully - NOT whether the drive is eligible. If an error was encountered while checking, this method returns FALSE and an error describing the problem will be set. The eligible parameter will contain the result of the check and indicate whether the volume can be used to store FP domains. Its value is only defined if the call returns YES. The url can be any existing and accessible URL on the volume for which you want to assess eligibility. The checks are volume-wide and the exact location on the volume doesn't impact them. If a drive is eligible, unsupportedReason will be empty (0). Otherwise it will contain the list of identified conditions that currently prevent this drive from being used to store FP domains.
func NSFileProviderManagerGetDomainsWithCompletionHandler ¶
func NSFileProviderManagerGetDomainsWithCompletionHandler(completionHandler func(*foundation.NSArray[*NSFileProviderDomain], unsafe.Pointer))
Get all registered domains.
func NSFileProviderManagerGetIdentifierForUserVisibleFileAtURLCompletionHandler ¶
func NSFileProviderManagerGetIdentifierForUserVisibleFileAtURLCompletionHandler(url *foundation.NSURL, completionHandler func(*foundation.NSString, *foundation.NSString, unsafe.Pointer))
Return the identifier and domain for a user visible URL. This method returns the identifier and domain of a user visible URL if applicable. Calling this method on a file which doesn't reside in your provider/domain, or which hasn't yet been assigned an identifier by the provider will return the Cocoa error NSFileNoSuchFileError.
func NSFileProviderManagerImportDomainFromDirectoryAtURLCompletionHandler ¶
func NSFileProviderManagerImportDomainFromDirectoryAtURLCompletionHandler(domain *NSFileProviderDomain, url *foundation.NSURL, completionHandler func(unsafe.Pointer))
Request the creation of a new domain that will take ownership of on-disk data that were previously managed without a file provider. You can use this method in order to migrate from a software that managed a file hierarchy on disk to a NSFileProviderExtension without having to redownload the data that was already on disk. The URL is expected to point to a directory. That directory will be moved away, its ownership being taken by the system. From this point, your extension's createItemFromTemplate method will be called for every item found in the directory with the special NSFileProviderCreateItemMayAlreadyExist option. In case a domain with the same name already exists in the file provider manager, the call will fail with the code NSFileWriteFileExistsError. The URL will remain untouched. In case the system does not allow the extension to request a migration, the call will fail with NSFeatureUnsupportedError. In case of success, the URL will become invalid and the domain will be created. The completion handler is called as soon as the domain is created. Your provider will receive calls to createItemBasedOnTemplate afterward. When the import of the file hierarchy is finished, the system calls -[NSFileProviderExtension signalDidFinishImportingItemsFromDiskWithCompletionHandler:]. In case -[NSFileProviderManager reimportItemsBelowItemWithIdentifier:completionHandler:] is called before the end of the import, a single call to importDidFinishWithCompletionHandler will be received for both the import and the scan.
func NSFileProviderManagerRemoveAllDomainsWithCompletionHandler ¶
func NSFileProviderManagerRemoveAllDomainsWithCompletionHandler(completionHandler func(unsafe.Pointer))
Remove all registered domains.
func NSFileProviderManagerRemoveDomainCompletionHandler ¶
func NSFileProviderManagerRemoveDomainCompletionHandler(domain *NSFileProviderDomain, completionHandler func(unsafe.Pointer))
Remove a domain.
func NSFileProviderManagerRemoveDomainModeCompletionHandler ¶
func NSFileProviderManagerRemoveDomainModeCompletionHandler(domain *NSFileProviderDomain, mode NSFileProviderDomainRemovalMode, completionHandler func(unsafe.Pointer, unsafe.Pointer))
Remove a domain with options
func NSFileProviderMaterializedSetDidChange ¶
func NSFileProviderMaterializedSetDidChange() *foundation.NSString
func NSFileProviderPendingSetDidChange ¶
func NSFileProviderPendingSetDidChange() *foundation.NSString
Posted when the pending set has changed. Interested clients can then use the pending set enumerator returned by -enumeratorForPendingItems to enumerate changes on the pending set. Note, this notification starts to be posted only after `+[NSFileProviderManager getDomainsWithCompletionHandler:]` is called.
func NSFileProviderRootContainerItemIdentifier ¶
func NSFileProviderRootContainerItemIdentifier() uintptr
The root of the hierarchical enumeration, i.e the container enumerated when the user starts browsing your file provider.
func NSFileProviderTrashContainerItemIdentifier ¶
func NSFileProviderTrashContainerItemIdentifier() uintptr
The container containing all the trashed items. When an item is trashed, its `parentItemIdentifier` becomes `NSFileProviderTrashContainerItemIdentifier`. Extension should be able to return all trashed items by supporting the creation of a NSFileProviderEnumerator for the trashed items.
func NSFileProviderUserInfoExperimentIDKey ¶
func NSFileProviderUserInfoExperimentIDKey() uintptr
System interpreted user info key When setting a value to that user info on a domain, the system will ingest this value. If user has given their consent for telemetry, this value will be used to decorate telemetry messages sent by the FileProvider subsystem. The telemetry messages can be then later on retrieved by developers along with the other metrics through the CloudKit console as detailed here: https://developer.apple.com/documentation/fileprovider/exporting-file-provider-metrics-data?language=objc This will help developers triaging data they receive from testing population compared to regular users The value must either be a NSNumber between [0 - 31]. If it's not in that range, or if it is not a NSNumber, any call to addDomain with that invalid UserInfo dictionary will fail with a EINVAL POSIX NSError. To update this value, the provider must call addDomain with an updated userInfo dictionary
func NSFileProviderWorkingSetContainerItemIdentifier ¶
func NSFileProviderWorkingSetContainerItemIdentifier() uintptr
The item identifier of the working set, a synthetic container used by the extension to communicate changes to the system even when the parent directories of these items aren't actively being enumerated. Items in this set should have their parentItemIdentifier set to the identifier of their parent directory. The working set is the set of files and directories that should be made available to the system regardless of the local browsing history. Files listed in the working set are indexed in the local Spotlight index and appear in offline search results. They contribute to the Recents view of the Files app, sorted by lastUsedDate, and it is therefore important to provide a consistent experience across devices by including in the working set all the documents recently used, trashed, favorited, shared or tagged. The Spotlight index and the Recents view will show outdated information unless the file provider extension keeps the working set up to date with local and remote changes. When an item in the working set is remotely modified, the extension calls -signalEnumeratorForContainerItemIdentifier: on the identifier of the working set; the system will then enumerate changes and update its caches. Starting in iOS 12 and macOS 10.15, the system maintains a cache on the local file system of files and directories previously enumerated. The working set is the container used to update that set of files. The extension may know whether an item is in that set by checking whether its parentItemIdentifier is listed in the materialized containers, see the documentation on -materializedItemsDidChangeWithCompletionHandler:.
Types ¶
type Acl_entry_id_t ¶
type Acl_entry_id_t int64
const ( ACL_FIRST_ENTRY Acl_entry_id_t = 0 ACL_NEXT_ENTRY Acl_entry_id_t = -1 ACL_LAST_ENTRY Acl_entry_id_t = -2 )
func (Acl_entry_id_t) String ¶
func (e Acl_entry_id_t) String() string
type Acl_flag_t ¶
type Acl_flag_t int64
const ( ACL_FLAG_DEFER_INHERIT Acl_flag_t = 1 ACL_FLAG_NO_INHERIT Acl_flag_t = 131072 ACL_ENTRY_INHERITED Acl_flag_t = 16 ACL_ENTRY_FILE_INHERIT Acl_flag_t = 32 ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64 ACL_ENTRY_LIMIT_INHERIT Acl_flag_t = 128 ACL_ENTRY_ONLY_INHERIT Acl_flag_t = 256 )
func (Acl_flag_t) String ¶
func (e Acl_flag_t) String() string
type Acl_perm_t ¶
type Acl_perm_t int64
const ( ACL_READ_DATA Acl_perm_t = 2 ACL_LIST_DIRECTORY Acl_perm_t = 2 ACL_WRITE_DATA Acl_perm_t = 4 ACL_ADD_FILE Acl_perm_t = 4 ACL_EXECUTE Acl_perm_t = 8 ACL_SEARCH Acl_perm_t = 8 ACL_DELETE Acl_perm_t = 16 ACL_APPEND_DATA Acl_perm_t = 32 ACL_ADD_SUBDIRECTORY Acl_perm_t = 32 ACL_DELETE_CHILD Acl_perm_t = 64 ACL_READ_ATTRIBUTES Acl_perm_t = 128 ACL_WRITE_ATTRIBUTES Acl_perm_t = 256 ACL_READ_EXTATTRIBUTES Acl_perm_t = 512 ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024 ACL_READ_SECURITY Acl_perm_t = 2048 ACL_WRITE_SECURITY Acl_perm_t = 4096 ACL_CHANGE_OWNER Acl_perm_t = 8192 ACL_SYNCHRONIZE Acl_perm_t = 1048576 )
func (Acl_perm_t) String ¶
func (e Acl_perm_t) String() string
type Acl_type_t ¶
type Acl_type_t int64
const ( ACL_TYPE_EXTENDED Acl_type_t = 256 ACL_TYPE_ACCESS Acl_type_t = 0 ACL_TYPE_DEFAULT Acl_type_t = 1 ACL_TYPE_AFS Acl_type_t = 2 ACL_TYPE_CODA Acl_type_t = 3 ACL_TYPE_NTFS Acl_type_t = 4 ACL_TYPE_NWFS Acl_type_t = 5 )
func (Acl_type_t) String ¶
func (e Acl_type_t) String() string
type Dispatch_autorelease_frequency_t ¶
type Dispatch_autorelease_frequency_t uint64
const ( DISPATCH_AUTORELEASE_FREQUENCY_INHERIT Dispatch_autorelease_frequency_t = 0 DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1 DISPATCH_AUTORELEASE_FREQUENCY_NEVER Dispatch_autorelease_frequency_t = 2 )
func (Dispatch_autorelease_frequency_t) String ¶
func (e Dispatch_autorelease_frequency_t) String() string
type Dispatch_block_flags_t ¶
type Dispatch_block_flags_t uint64
const ( DISPATCH_BLOCK_BARRIER Dispatch_block_flags_t = 1 DISPATCH_BLOCK_DETACHED Dispatch_block_flags_t = 2 DISPATCH_BLOCK_ASSIGN_CURRENT Dispatch_block_flags_t = 4 DISPATCH_BLOCK_NO_QOS_CLASS Dispatch_block_flags_t = 8 DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16 DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32 )
func (Dispatch_block_flags_t) String ¶
func (e Dispatch_block_flags_t) String() string
type Filesec_property_t ¶
type Filesec_property_t int64
const ( FILESEC_OWNER Filesec_property_t = 1 FILESEC_GROUP Filesec_property_t = 2 FILESEC_UUID Filesec_property_t = 3 FILESEC_MODE Filesec_property_t = 4 FILESEC_ACL Filesec_property_t = 5 FILESEC_GRPUUID Filesec_property_t = 6 FILESEC_ACL_RAW Filesec_property_t = 100 FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101 )
func (Filesec_property_t) String ¶
func (e Filesec_property_t) String() string
type Ipc_info_object_type_t ¶
type Ipc_info_object_type_t int64
const ( IPC_OTYPE_NONE Ipc_info_object_type_t = 0 IPC_OTYPE_THREAD_CONTROL Ipc_info_object_type_t = 1 IPC_OTYPE_TASK_CONTROL Ipc_info_object_type_t = 2 IPC_OTYPE_HOST Ipc_info_object_type_t = 3 IPC_OTYPE_HOST_PRIV Ipc_info_object_type_t = 4 IPC_OTYPE_PROCESSOR Ipc_info_object_type_t = 5 IPC_OTYPE_PROCESSOR_SET Ipc_info_object_type_t = 6 IPC_OTYPE_PROCESSOR_SET_NAME Ipc_info_object_type_t = 7 IPC_OTYPE_TIMER Ipc_info_object_type_t = 8 IPC_OTYPE_PORT_SUBST_ONCE Ipc_info_object_type_t = 9 IPC_OTYPE_MIG Ipc_info_object_type_t = 10 IPC_OTYPE_MEMORY_OBJECT Ipc_info_object_type_t = 11 IPC_OTYPE_XMM_PAGER Ipc_info_object_type_t = 12 IPC_OTYPE_XMM_KERNEL Ipc_info_object_type_t = 13 IPC_OTYPE_XMM_REPLY Ipc_info_object_type_t = 14 IPC_OTYPE_UND_REPLY Ipc_info_object_type_t = 15 IPC_OTYPE_HOST_NOTIFY Ipc_info_object_type_t = 16 IPC_OTYPE_HOST_SECURITY Ipc_info_object_type_t = 17 IPC_OTYPE_LEDGER Ipc_info_object_type_t = 18 IPC_OTYPE_MAIN_DEVICE Ipc_info_object_type_t = 19 IPC_OTYPE_TASK_NAME Ipc_info_object_type_t = 20 IPC_OTYPE_SUBSYSTEM Ipc_info_object_type_t = 21 IPC_OTYPE_IO_DONE_QUEUE Ipc_info_object_type_t = 22 IPC_OTYPE_SEMAPHORE Ipc_info_object_type_t = 23 IPC_OTYPE_LOCK_SET Ipc_info_object_type_t = 24 IPC_OTYPE_CLOCK Ipc_info_object_type_t = 25 IPC_OTYPE_CLOCK_CTRL Ipc_info_object_type_t = 26 IPC_OTYPE_IOKIT_IDENT Ipc_info_object_type_t = 27 IPC_OTYPE_NAMED_ENTRY Ipc_info_object_type_t = 28 IPC_OTYPE_IOKIT_CONNECT Ipc_info_object_type_t = 29 IPC_OTYPE_IOKIT_OBJECT Ipc_info_object_type_t = 30 IPC_OTYPE_UPL Ipc_info_object_type_t = 31 IPC_OTYPE_MEM_OBJ_CONTROL Ipc_info_object_type_t = 32 IPC_OTYPE_AU_SESSIONPORT Ipc_info_object_type_t = 33 IPC_OTYPE_FILEPORT Ipc_info_object_type_t = 34 IPC_OTYPE_LABELH Ipc_info_object_type_t = 35 IPC_OTYPE_TASK_RESUME Ipc_info_object_type_t = 36 IPC_OTYPE_VOUCHER Ipc_info_object_type_t = 37 IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38 IPC_OTYPE_WORK_INTERVAL Ipc_info_object_type_t = 39 IPC_OTYPE_UX_HANDLER Ipc_info_object_type_t = 40 IPC_OTYPE_UEXT_OBJECT Ipc_info_object_type_t = 41 IPC_OTYPE_ARCADE_REG Ipc_info_object_type_t = 42 IPC_OTYPE_EVENTLINK Ipc_info_object_type_t = 43 IPC_OTYPE_TASK_INSPECT Ipc_info_object_type_t = 44 IPC_OTYPE_TASK_READ Ipc_info_object_type_t = 45 IPC_OTYPE_THREAD_INSPECT Ipc_info_object_type_t = 46 IPC_OTYPE_THREAD_READ Ipc_info_object_type_t = 47 IPC_OTYPE_SUID_CRED Ipc_info_object_type_t = 48 IPC_OTYPE_HYPERVISOR Ipc_info_object_type_t = 49 IPC_OTYPE_TASK_ID_TOKEN Ipc_info_object_type_t = 50 IPC_OTYPE_TASK_FATAL Ipc_info_object_type_t = 51 IPC_OTYPE_KCDATA Ipc_info_object_type_t = 52 IPC_OTYPE_EXCLAVES_RESOURCE Ipc_info_object_type_t = 53 IPC_OTYPE_THREAD_RESUME Ipc_info_object_type_t = 54 IPC_OTYPE_UNKNOWN Ipc_info_object_type_t = 4294967295 )
func (Ipc_info_object_type_t) String ¶
func (e Ipc_info_object_type_t) String() string
type Launch_data_type_t ¶
type Launch_data_type_t int64
const ( LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1 LAUNCH_DATA_ARRAY Launch_data_type_t = 2 LAUNCH_DATA_FD Launch_data_type_t = 3 LAUNCH_DATA_INTEGER Launch_data_type_t = 4 LAUNCH_DATA_REAL Launch_data_type_t = 5 LAUNCH_DATA_BOOL Launch_data_type_t = 6 LAUNCH_DATA_STRING Launch_data_type_t = 7 LAUNCH_DATA_OPAQUE Launch_data_type_t = 8 LAUNCH_DATA_ERRNO Launch_data_type_t = 9 LAUNCH_DATA_MACHPORT Launch_data_type_t = 10 )
func (Launch_data_type_t) String ¶
func (e Launch_data_type_t) String() string
type MDLabelDomain ¶
type MDLabelDomain int64
@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int64
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int64
@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
type Mach_vm_range_flags_t ¶
type Mach_vm_range_flags_t int64
const (
MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)
func (Mach_vm_range_flags_t) String ¶
func (e Mach_vm_range_flags_t) String() string
type Mach_vm_range_flavor_t ¶
type Mach_vm_range_flavor_t int64
const ( MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0 MACH_VM_RANGE_FLAVOR_V1 Mach_vm_range_flavor_t = 1 )
func (Mach_vm_range_flavor_t) String ¶
func (e Mach_vm_range_flavor_t) String() string
type Mach_vm_range_tag_t ¶
type Mach_vm_range_tag_t int64
const ( MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0 MACH_VM_RANGE_DATA Mach_vm_range_tag_t = 1 MACH_VM_RANGE_FIXED Mach_vm_range_tag_t = 2 )
func (Mach_vm_range_tag_t) String ¶
func (e Mach_vm_range_tag_t) String() string
type Mpo_flags_t ¶
type Mpo_flags_t int64
const ( MPO_PORT Mpo_flags_t = 0 MPO_SERVICE_PORT Mpo_flags_t = 1024 MPO_CONNECTION_PORT Mpo_flags_t = 2048 MPO_REPLY_PORT Mpo_flags_t = 4096 MPO_WEAK_REPLY_PORT Mpo_flags_t = 16384 MPO_NOTIFICATION_PORT Mpo_flags_t = 17408 MPO_EXCEPTION_PORT Mpo_flags_t = 32768 MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536 )
func (Mpo_flags_t) String ¶
func (e Mpo_flags_t) String() string
type NSFileProviderChangeObserver ¶
type NSFileProviderChangeObserver interface {
DidUpdateItems(updatedItems *foundation.NSArray[NSFileProviderItem])
DidDeleteItemsWithIdentifiers(deletedItemIdentifiers *foundation.NSArray[*foundation.NSString])
FinishEnumeratingChangesUpToSyncAnchorMoreComing(anchor *foundation.NSData, moreComing bool)
FinishEnumeratingWithError(error_ unsafe.Pointer)
SuggestedBatchSize() int
}
NSFileProviderChangeObserver wraps the ObjC protocol NSFileProviderChangeObserver.
type NSFileProviderContentPolicy ¶
type NSFileProviderContentPolicy int64
const ( // Inherit the content policy of the parent folder. This is the default policy on every item other than the root. NSFileProviderContentPolicyInherited NSFileProviderContentPolicy = 0 // Download this item lazily (i.e when it is read) if it is dataless. Download remote content updates eagerly if this file is not dataless. Allow eviction on low disk pressure and other triggers. This is the default policy on the root on macOS. NSFileProviderContentPolicyDownloadLazily NSFileProviderContentPolicy = 1 // Download this item lazily (i.e when it is read.) Evict the file upon remote content update. Also allow eviction on low disk pressure and other triggers. This is the default policy on the root on iOS. NSFileProviderContentPolicyDownloadLazilyAndEvictOnRemoteUpdate NSFileProviderContentPolicy = 2 // Download this item eagerly (i.e before it is read.) Keep downloading remote updates eagerly. Prevent eviction on low disk pressure and other triggers. When an item with the inherited policy is moved into a folder with this policy, the system will automatically schedule a download. NSFileProviderContentPolicyDownloadEagerlyAndKeepDownloaded NSFileProviderContentPolicy = 3 )
func (NSFileProviderContentPolicy) String ¶
func (e NSFileProviderContentPolicy) String() string
type NSFileProviderCreateItemOptions ¶
type NSFileProviderCreateItemOptions uint64
const ( // The imported item may already exist. This can happen because: 1. The imported item was found on disk after the synchronisation state was lost, for example following the restoration of a backup, or the migration to a new device. 2. Two directories are merged together, due to the extension returning the same itemIdentifier for both directories on the createItem completion handler. Each child resulting of the merge may be recreated with the mayAlreadyExist option. This allows the extension to recursively merge directories. The Extension should assess whether the item could actually be a disk representation of an already existing item. The best user experience is to match the requested item to one on the server, if the extension is able to confirm that the disk item is representing an item already on the server. Given that this flag may be set when the system is reimporting all items from disk, it is advised that the Extension attempts assessment methods for each item in order from cheapest to most expensive (in terms of CPU and network), in order to avoid unnecessary work. When all the items pending reimport have been processed, the system will call -[NSFileProviderExtension importDidFinishWithCompletionHandler:]. NSFileProviderCreateItemMayAlreadyExist NSFileProviderCreateItemOptions = 1 // This item is recreated after the system failed to apply a deletion requested by the extension because the item was found to be edited locally. This happens only if the edit wasn't yet known by the system at the time the deletion was requested. NSFileProviderCreateItemDeletionConflicted NSFileProviderCreateItemOptions = 2 )
func (NSFileProviderCreateItemOptions) String ¶
func (e NSFileProviderCreateItemOptions) String() string
type NSFileProviderCustomAction ¶
type NSFileProviderCustomAction interface {
PerformActionWithIdentifierOnItemsWithIdentifiersCompletionHandler(actionIdentifier *foundation.NSString, itemIdentifiers *foundation.NSArray[*foundation.NSString], completionHandler func(unsafe.Pointer)) *foundation.NSProgress
}
NSFileProviderCustomAction wraps the ObjC protocol NSFileProviderCustomAction.
type NSFileProviderDeleteItemOptions ¶
type NSFileProviderDeleteItemOptions uint64
const ( // The deletion of the item is recursive. NSFileProviderDeleteItemRecursive NSFileProviderDeleteItemOptions = 1 )
func (NSFileProviderDeleteItemOptions) String ¶
func (e NSFileProviderDeleteItemOptions) String() string
type NSFileProviderDomain ¶
type NSFileProviderDomain struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderdomain
func NSFileProviderDomainFromID ¶
func NSFileProviderDomainFromID(id objc.ID) *NSFileProviderDomain
func (*NSFileProviderDomain) BackingStoreIdentity ¶
func (o *NSFileProviderDomain) BackingStoreIdentity() *foundation.NSData
Identity of the backing store of the domain on the system. This property only applies for extensions that implement NSFileProviderReplicatedExtension. This provides an identifier that uniquely identifies the backing store used by the system for the domain. When this identifier has changed, the system has dropped its backing store and is building a new one. The system may decide to rebuild its backing store if it got corrupted. The backing store can also be rebuilt as a response to the provider calling `-[NSFileProviderManager reimportItemsBelowItemWithIdentifier:completionHandler:]`. It is guaranteed that calling reimport on the root item will cause the backing store to be rebuilt, but the system can also decide to do so when reimport is called on other items. When rebuilding the backing store, the system will invalidate any extension instance associated to that domain. As a consequence, the identity of the backing store associated with that domain is guaranteed to be stable for the lifetime of the NSFileProviderReplicatedExtension instance.
func (*NSFileProviderDomain) DisplayName ¶
func (o *NSFileProviderDomain) DisplayName() *foundation.NSString
The display name shown by the system to represent this domain.
func (*NSFileProviderDomain) Identifier ¶
func (o *NSFileProviderDomain) Identifier() *foundation.NSString
The identifier - as provided by the file provider extension.
func (*NSFileProviderDomain) InitWithDisplayNameUserInfoVolumeURL ¶
func (o *NSFileProviderDomain) InitWithDisplayNameUserInfoVolumeURL(displayName *foundation.NSString, userInfo *foundation.NSDictionary[objc.ID, objc.ID], volumeURL *foundation.NSURL) *NSFileProviderDomain
Initialize a new replicated NSFileProviderDomain on a specific volume. If a volumeURL is specified, and that volume is eligible, the domain will be located on this volume. The URL is used to designate a volume but doesn't influence where on this volume is the domain going to be stored. In order to avoid domainID collisions between volumes, the NSFileProviderDomainIdentifier of external domains are generated randomly by FileProvider. The provider should therefore use the userInfo to associate all necessary information to map the created object to the corresponding account. The userInfo will be persisted on the volume where the domain was created. If that is an external volume, the userInfo can be used on other devices to assist in setting up the domain on those devices. See the`NSFileProviderExternalVolumeHandling` protocol for more details.
func (*NSFileProviderDomain) InitWithIdentifierDisplayName ¶
func (o *NSFileProviderDomain) InitWithIdentifierDisplayName(identifier *foundation.NSString, displayName *foundation.NSString) *NSFileProviderDomain
Initialize a new replicated NSFileProviderDomain The extension will be implementing NSFileProviderReplicatedExtension. The file provider extension implementation can pick any @c identifier as it sees fit to identify the group of items. The identifier must not contain any characters from this set: [/:] In order to migrate a non-replicated domain to a replicated one, implementers have to make sure that they do not use the default domain, and then call +[NSFileProviderManager addDomain:completionHandler:] using the NSFileProviderDomain object returned by that init method. A domain with a specific identifier can be added multiple times; subsequent adds will update the properties of the existing domain. If a replicated domain is added "on top" of a non-replicated domain, the domain will be migrated to be replicated; existing bookmarks will remain valid, but the (externally visible) location of items will change to reflect the replicated location. It is not possible to migrate the default domain in this manner (since the default domain can not be added). It is recommended to migrate usage of the default domain to a domain with an explicit identifier instead. @param displayName a user visible string representing the group of items the file provider extension is using.
func (*NSFileProviderDomain) IsDisconnected ¶
func (o *NSFileProviderDomain) IsDisconnected() bool
If set, the domain is present, but disconnected from its extension. In this state, the user continues to be able to browse the domain's contents, but the extension doesn't receive updates on modifications to the files, nor is it consulted to update folder's contents. The disconnected state can be modified on an existing domain via the disconnectWithReason method on NSFileProviderManager.
func (*NSFileProviderDomain) IsHidden ¶
func (o *NSFileProviderDomain) IsHidden() bool
If this domain is not user visible. Typically, this can be used for dry-run migration. The files are still on disk though.
func (*NSFileProviderDomain) IsReplicated ¶
func (o *NSFileProviderDomain) IsReplicated() bool
If the domain is a replicated domain. If set to YES, it means the domain is replicated. By default, on macOS, the value will always be YES. On iOS, it will depend on the way the NSFileProviderDomain object is contructed. Calling -[NSFileProviderDomain initWithIdentifier:displayName:] will initialize a replicated domain. -[NSFileProviderDomain initWithIdentifier:displayName:pathRelativeToDocumentStorage:] will initialize a non-replicated domain. To know whether a domain is replicated or not, users are advised to rely on the output of +[NSFileProviderManager getDomainsForProviderIdentifier:completionHandler:]
func (*NSFileProviderDomain) ReplicatedKnownFolders ¶
func (o *NSFileProviderDomain) ReplicatedKnownFolders() NSFileProviderKnownFolders
List of known folders that are currently replicated by this domain.
func (*NSFileProviderDomain) SetHidden ¶
func (o *NSFileProviderDomain) SetHidden(hidden bool)
func (*NSFileProviderDomain) SetSupportedKnownFolders ¶
func (o *NSFileProviderDomain) SetSupportedKnownFolders(supportedKnownFolders NSFileProviderKnownFolders)
func (*NSFileProviderDomain) SetSupportsStringSearchRequest ¶
func (o *NSFileProviderDomain) SetSupportsStringSearchRequest(supportsStringSearchRequest bool)
func (*NSFileProviderDomain) SetSupportsSyncingTrash ¶
func (o *NSFileProviderDomain) SetSupportsSyncingTrash(supportsSyncingTrash bool)
func (*NSFileProviderDomain) SetTestingModes ¶
func (o *NSFileProviderDomain) SetTestingModes(testingModes NSFileProviderDomainTestingModes)
func (*NSFileProviderDomain) SetUserInfo ¶
func (o *NSFileProviderDomain) SetUserInfo(userInfo *foundation.NSDictionary[objc.ID, objc.ID])
func (*NSFileProviderDomain) SupportedKnownFolders ¶
func (o *NSFileProviderDomain) SupportedKnownFolders() NSFileProviderKnownFolders
List known folders that can be replicated by this domain.
func (*NSFileProviderDomain) SupportsStringSearchRequest ¶
func (o *NSFileProviderDomain) SupportsStringSearchRequest() bool
Whether the system should use this domain's `NSFileProviderSearching` implementation to support search experiences. Defaults to NO.
func (*NSFileProviderDomain) SupportsSyncingTrash ¶
func (o *NSFileProviderDomain) SupportsSyncingTrash() bool
Whether the domain supports syncing the trash. The system supports syncing a trash folder (NSFileProviderTrashContainerItemIdentifier) to the extension. On iOS, this is surfaced to the user as "Recently Deleted" in the Files app. On macOS, this is surfaced to the user as the Trash in Finder. If the domain is configured with supportsSyncingTrash=YES, the system will reparent trashed files (which were located in the extension's domain) to NSFileProviderTrashContainerItemIdentifier. If the domain is configured with supportsSyncingTrash=NO, the system will decide how to handle the trashing operation (not guaranteed by API contract). This property is only applicable for NSFileProviderReplicatedExtension-based domains. This property defaults to YES.
func (*NSFileProviderDomain) TestingModes ¶
func (o *NSFileProviderDomain) TestingModes() NSFileProviderDomainTestingModes
Testing modes. Testing modes are exposed as a means for the provider to have more control over the system in a testing environment. Enabling a testing mode alters the behavior of the system and enables some APIs for that mode. A process must have the com.apple.developer.fileprovider.testing-mode entitlement in order to configure a domain with non-empty testing modes.
func (*NSFileProviderDomain) UserEnabled ¶
func (o *NSFileProviderDomain) UserEnabled() bool
If user has disabled this domain from Files.app on iOS or System Settings on macOS, this will be set to NO.
func (*NSFileProviderDomain) UserInfo ¶
func (o *NSFileProviderDomain) UserInfo() *foundation.NSDictionary[objc.ID, objc.ID]
A dictionary set by the client app. Keys must be strings, values must be [String, Number, Date, Data]
func (*NSFileProviderDomain) VolumeUUID ¶
func (o *NSFileProviderDomain) VolumeUUID() *foundation.NSUUID
type NSFileProviderDomainRemovalMode ¶
type NSFileProviderDomainRemovalMode int64
const ( // Don't keep any files that are current in the domain NSFileProviderDomainRemovalModeRemoveAll NSFileProviderDomainRemovalMode = 0 // Delete the domain from the system but keeps the at least all the dirty corresponding user data around. NSFileProviderDomainRemovalModePreserveDirtyUserData NSFileProviderDomainRemovalMode = 1 // Delete the domain from the system but keeps all the downloaded corresponding user data around. NSFileProviderDomainRemovalModePreserveDownloadedUserData NSFileProviderDomainRemovalMode = 2 )
func (NSFileProviderDomainRemovalMode) String ¶
func (e NSFileProviderDomainRemovalMode) String() string
type NSFileProviderDomainState ¶
type NSFileProviderDomainState interface {
DomainVersion() *NSFileProviderDomainVersion
UserInfo() *foundation.NSDictionary[objc.ID, objc.ID]
}
NSFileProviderDomainState wraps the ObjC protocol NSFileProviderDomainState.
type NSFileProviderDomainTestingModes ¶
type NSFileProviderDomainTestingModes uint64
const ( // Enable the domain without any user action required. NSFileProviderDomainTestingModeAlwaysEnabled NSFileProviderDomainTestingModes = 1 // Enable interactive mode. Disable the automatic scheduling from the system and allow external tools to control the execution of operations. When manual scheduling is enabled, an external tool should use -[NSFileProviderManager listAvailableTestingOperationsWithError:] and -[NSFileProviderManager runTestingOperations:error:] to control the system. If that mode is enabled, some crash recovery guarantees are lost. For instance, the system may lose any event that hasn't been ingested. The system does not support removing this mode from a domain on which it has been enabled. NSFileProviderDomainTestingModeInteractive NSFileProviderDomainTestingModes = 2 )
func (NSFileProviderDomainTestingModes) String ¶
func (e NSFileProviderDomainTestingModes) String() string
type NSFileProviderDomainVersion ¶
type NSFileProviderDomainVersion struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderdomainversion
func NSFileProviderDomainVersionFromID ¶
func NSFileProviderDomainVersionFromID(id objc.ID) *NSFileProviderDomainVersion
func (*NSFileProviderDomainVersion) Compare ¶
func (o *NSFileProviderDomainVersion) Compare(otherVersion *NSFileProviderDomainVersion) foundation.NSComparisonResult
Compare two domain versions. This returns the NSComparisonResult of the comparison of the receiver and the other version: - NSOrderedAscending if the receiver predates the otherVersion - NSOrderedDescending if the otherVersion predates the receiver - NSOrderedSame if both versions are equal In Swift, NSFileProviderDomainVersion is comparable.
func (*NSFileProviderDomainVersion) Next ¶
func (o *NSFileProviderDomainVersion) Next() *NSFileProviderDomainVersion
Build a version that is strictly greater than the receiver.
type NSFileProviderEnumerating ¶
type NSFileProviderEnumerating interface {
EnumeratorForContainerItemIdentifierRequestError(containerItemIdentifier *foundation.NSString, request *NSFileProviderRequest) (NSFileProviderEnumerator, error)
}
NSFileProviderEnumerating wraps the ObjC protocol NSFileProviderEnumerating.
type NSFileProviderEnumerationObserver ¶
type NSFileProviderEnumerationObserver interface {
DidEnumerateItems(updatedItems *foundation.NSArray[NSFileProviderItem])
FinishEnumeratingUpToPage(nextPage *foundation.NSData)
FinishEnumeratingWithError(error_ unsafe.Pointer)
SuggestedPageSize() int
}
NSFileProviderEnumerationObserver wraps the ObjC protocol NSFileProviderEnumerationObserver.
type NSFileProviderEnumerator ¶
type NSFileProviderEnumerator interface {
Invalidate()
EnumerateItemsForObserverStartingAtPage(observer NSFileProviderEnumerationObserver, page *foundation.NSData)
}
NSFileProviderEnumerator wraps the ObjC protocol NSFileProviderEnumerator.
type NSFileProviderErrorCode ¶
type NSFileProviderErrorCode int64
const ( // The user credentials cannot be verified NSFileProviderErrorNotAuthenticated NSFileProviderErrorCode = -1000 // An item already exists with the same parentItemIdentifier and filename (or with a filename differing only in case.) \note Please use -[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:] to build an error with this code. \see -[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:] NSFileProviderErrorFilenameCollision NSFileProviderErrorCode = -1001 // The value of the sync anchor is too old, and the system must re-sync from scratch NSFileProviderErrorSyncAnchorExpired NSFileProviderErrorCode = -1002 // The value of the page token is too old, and the system must re-sync from scratch NSFileProviderErrorPageExpired NSFileProviderErrorCode = -1002 // The item has not been uploaded because it would push the account over quota NSFileProviderErrorInsufficientQuota NSFileProviderErrorCode = -1003 // Connecting to the servers failed NSFileProviderErrorServerUnreachable NSFileProviderErrorCode = -1004 // The requested item doesn't exist \note Please use -[NSError (NSFileProviderError) fileProviderErrorForNonExistentItemWithIdentifier:] to build an error with this code. \see -[NSError (NSFileProviderError) fileProviderErrorForNonExistentItemWithIdentifier:] NSFileProviderErrorNoSuchItem NSFileProviderErrorCode = -1005 // The provider disallowed the deletion of the item. \note Please use -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:] to build an error with this code. \see -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:] NSFileProviderErrorDeletionRejected NSFileProviderErrorCode = -1006 // We're trying to non-recursively delete a non-empty directory NSFileProviderErrorDirectoryNotEmpty NSFileProviderErrorCode = -1007 // Returned by NSFileProviderManager if no provider could be found in the application NSFileProviderErrorProviderNotFound NSFileProviderErrorCode = -2001 // Returned by NSFileProviderManager if the application's provider has been disabled due to app translocation NSFileProviderErrorProviderTranslocated NSFileProviderErrorCode = -2002 // Returned by NSFileProviderManager if the provider registered in the system is an older version than the one corresponding to this app. The `NSFilePathErrorKey` key points to the location of the older version. If the location of the older version cannot be determined (e.g. because it was since deleted), the `NSFilePathErrorKey` will not be set. NSFileProviderErrorOlderExtensionVersionRunning NSFileProviderErrorCode = -2003 // Returned by NSFileProviderManager if the provider registered in the system is a newer version than the one corresponding to this app. NSFileProviderErrorNewerExtensionVersionFound NSFileProviderErrorCode = -2004 // Indicates that synchronization cannot happen. This error can be returned by the provider or the system. This is returned by NSFileProviderManager if a barrier failed for a sync-related error. If the failure is caused by a specific item, the system will set the NSFileProviderErrorItemKey to the corresponding item identifier and the NSUnderlyingErrorKey will be set to the error encountered by that item. When a provider returns this error on createItem or updateItem, it means that syncing that item is definitively broken. The system will not retry syncing those items, until either: The operating system has been updated. The FileProvider extension has been updated. The item is modified on disk. NSFileProviderErrorCannotSynchronize NSFileProviderErrorCode = -2005 // Returned by NSFileProviderManager if directory eviction failed because the target contains non-evictable items. -[NSError underlyingErrors] is set to an array of the underlying errors. Each one has NSURLErrorKey set to identify the particular file or directory affected by this error. The number of reported failing items is capped to an implementation-defined number. + domain: NSFileProviderErrorDomain errorCode: NSFileProviderErrorUnsyncedEdits error: if the item had unsynced content. + domain: NSFileProviderErrorDomain errorCode: NSFileProviderErrorNonEvictable error: if the item has been marked as non-purgeable by the provider. + domain: NSPOSIXErrorDomain errorCode: EBUSY - if the item had open file descriptors on it. + domain: NSPOSIXErrorDomain errorCode: EMLINK : if the item had several hardlinks. NSFileProviderErrorNonEvictableChildren NSFileProviderErrorCode = -2006 // Returned by NSFileProviderManager if item eviction is failing because the item has edits that have not been synced yet The NSURLErrorKey will be set to with the item URL that has unsynced content. NSFileProviderErrorUnsyncedEdits NSFileProviderErrorCode = -2007 // Returned by NSFileProviderManager if item eviction is failing because the item has not been assigned the evictable capability. The NSURLErrorKey will be set to with the corresponding item URL. NSFileProviderErrorNonEvictable NSFileProviderErrorCode = -2008 // Returned by the provider to indicate that the requested version for an item cannot be provided. When a provider returns that error, it means the version for this item is definitively unavailable. It is intended to be returned by fetchPartialContentsForItemWithIdentifier, when NSFileProviderFetchContentsOptionsStrictVersioning is set, to tell the system that a remote update happened to the item that outdated the requested version. NSFileProviderErrorVersionNoLongerAvailable NSFileProviderErrorCode = -2009 NSFileProviderErrorDomainDisabled NSFileProviderErrorCode = -2011 NSFileProviderErrorProviderDomainNotFound NSFileProviderErrorCode = -2013 NSFileProviderErrorApplicationExtensionNotFound NSFileProviderErrorCode = -2014 NSFileProviderErrorLocalVersionConflictingWithServer NSFileProviderErrorCode = -2015 )
func (NSFileProviderErrorCode) String ¶
func (e NSFileProviderErrorCode) String() string
type NSFileProviderExternalVolumeHandling ¶
type NSFileProviderExternalVolumeHandling interface {
ShouldConnectExternalDomainWithCompletionHandler(completionHandler func(unsafe.Pointer))
}
NSFileProviderExternalVolumeHandling wraps the ObjC protocol NSFileProviderExternalVolumeHandling.
type NSFileProviderFetchContentsOptions ¶
type NSFileProviderFetchContentsOptions uint64
const ( // Set by the system to inform the provider that any other content version than the requested one will be discarded. If the provider cannot supply this version, it should fail with NSFileProviderErrorVersionNoLongerAvailable. NSFileProviderFetchContentsOptionsStrictVersioning NSFileProviderFetchContentsOptions = 1 )
func (NSFileProviderFetchContentsOptions) String ¶
func (e NSFileProviderFetchContentsOptions) String() string
type NSFileProviderFileSystemFlags ¶
type NSFileProviderFileSystemFlags uint64
const ( // Item has the POSIX user-executable (u+x) permission. NSFileProviderFileSystemUserExecutable NSFileProviderFileSystemFlags = 1 // Item has the POSIX user-readable (u+r) permission. NSFileProviderFileSystemUserReadable NSFileProviderFileSystemFlags = 2 // Item has the POSIX user-writable (u+w) permission. NSFileProviderFileSystemUserWritable NSFileProviderFileSystemFlags = 4 // Item should not be presented in the file viewers. This includes both the UF_HIDDEN BSD flag and the Invisible bit from the FinderInfo. When syncing down, the system only sets the UF_HIDDEN flag. NSFileProviderFileSystemHidden NSFileProviderFileSystemFlags = 8 // The extension of the item should not be presented in the file viewers. NSFileProviderFileSystemPathExtensionHidden NSFileProviderFileSystemFlags = 16 )
func (NSFileProviderFileSystemFlags) String ¶
func (e NSFileProviderFileSystemFlags) String() string
type NSFileProviderIncrementalContentFetching ¶
type NSFileProviderIncrementalContentFetching interface {
FetchContentsForItemWithIdentifierVersionUsingExistingContentsAtURLExistingVersionRequestCompletionHandler(itemIdentifier *foundation.NSString, requestedVersion *NSFileProviderItemVersion, existingContents *foundation.NSURL, existingVersion *NSFileProviderItemVersion, request *NSFileProviderRequest, completionHandler objc.Block) *foundation.NSProgress
}
NSFileProviderIncrementalContentFetching wraps the ObjC protocol NSFileProviderIncrementalContentFetching.
type NSFileProviderItem ¶
type NSFileProviderItem interface {
ItemIdentifier() *foundation.NSString
ParentItemIdentifier() *foundation.NSString
Filename() *foundation.NSString
}
NSFileProviderItem wraps the ObjC protocol NSFileProviderItem.
type NSFileProviderItemCapabilities ¶
type NSFileProviderItemCapabilities uint64
const ( // Indicates that the file can be opened for reading. If set on a folder this is equivalent to @c .allowsContentEnumerating. NSFileProviderItemCapabilitiesAllowsReading NSFileProviderItemCapabilities = 1 // Indicates that the file can be opened for writing. If set on a folder, this is equivalent to @c .allowsAddingSubItems. NSFileProviderItemCapabilitiesAllowsWriting NSFileProviderItemCapabilities = 2 // Indicates that the item can be moved to another folder NSFileProviderItemCapabilitiesAllowsReparenting NSFileProviderItemCapabilities = 4 // Indicates that the item can be renamed NSFileProviderItemCapabilitiesAllowsRenaming NSFileProviderItemCapabilities = 8 // Indicates that the item can be moved to the trash NSFileProviderItemCapabilitiesAllowsTrashing NSFileProviderItemCapabilities = 16 // Indicates that the item can be deleted NSFileProviderItemCapabilitiesAllowsDeleting NSFileProviderItemCapabilities = 32 // Indicates that the item can be evicted. If this capability is set on an item, the item will become evictable when the item is fully uploaded (-[NSFileProviderItem isUploaded] not implemented or set to YES), is not actively used and contains no local changes. The eviction can happen either because the user selected the "Remove Download" option in Finder, because the provider decided to evict the item using `-[NSFileProviderManager evictItemWithIdentifier:completionHandler:]`, or because the system ran into a low-disk space scenario. If this capability is not present, the item will never be evicted. If the provider wishes to only suppress the user's ability to evict the item in the UI (but retain the ability of the OS or the provider's program to evict items), the provider can set the following key to false in their Info.plist, in the NSExtension section: NSExtensionFileProviderAllowsUserControlledEviction NSFileProviderItemCapabilitiesAllowsEvicting NSFileProviderItemCapabilities = 64 // Indicates that the item can be excluded from sync. The user can choose to exclude the item in the UI (Finder), in which case the system will stop monitoring changes for the item and its children and will remove the item from the provider. This capability can be used to allow an item to be excluded from sync. NSFileProviderItemCapabilitiesAllowsExcludingFromSync NSFileProviderItemCapabilities = 128 // Indicates that items can be imported to the folder. If set on a file, this is equivalent to @c .allowsWriting. NSFileProviderItemCapabilitiesAllowsAddingSubItems NSFileProviderItemCapabilities = 2 // Indicates that the folder can be enumerated. If set on a file, this is equivalent to @c .allowsReading. NSFileProviderItemCapabilitiesAllowsContentEnumerating NSFileProviderItemCapabilities = 1 NSFileProviderItemCapabilitiesAllowsAll NSFileProviderItemCapabilities = 63 )
func (NSFileProviderItemCapabilities) String ¶
func (e NSFileProviderItemCapabilities) String() string
type NSFileProviderItemDecorating ¶
type NSFileProviderItemDecorating interface {
NSFileProviderItem
Decorations() *foundation.NSArray[*foundation.NSString]
}
NSFileProviderItemDecorating wraps the ObjC protocol NSFileProviderItemDecorating.
type NSFileProviderItemFields ¶
type NSFileProviderItemFields uint64
const ( NSFileProviderItemContents NSFileProviderItemFields = 1 NSFileProviderItemFilename NSFileProviderItemFields = 2 NSFileProviderItemParentItemIdentifier NSFileProviderItemFields = 4 NSFileProviderItemLastUsedDate NSFileProviderItemFields = 8 NSFileProviderItemTagData NSFileProviderItemFields = 16 NSFileProviderItemFavoriteRank NSFileProviderItemFields = 32 NSFileProviderItemCreationDate NSFileProviderItemFields = 64 NSFileProviderItemContentModificationDate NSFileProviderItemFields = 128 NSFileProviderItemFileSystemFlags NSFileProviderItemFields = 256 NSFileProviderItemExtendedAttributes NSFileProviderItemFields = 512 NSFileProviderItemTypeAndCreator NSFileProviderItemFields = 1024 )
func (NSFileProviderItemFields) String ¶
func (e NSFileProviderItemFields) String() string
type NSFileProviderItemVersion ¶
type NSFileProviderItemVersion struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileprovideritemversion
func NSFileProviderItemVersionFromID ¶
func NSFileProviderItemVersionFromID(id objc.ID) *NSFileProviderItemVersion
func (*NSFileProviderItemVersion) ContentVersion ¶
func (o *NSFileProviderItemVersion) ContentVersion() *foundation.NSData
Version data for the content of the file. This property is used by the system for two purposes: if the contentVersion changes, - the system assumes that the contents have changed and will trigger a redownload if necessary. The exception to this is the case where the extension accepts a content sent by the system when replying to a createItemBasedOnTemplate or modifyItem call with shouldFetchContent set to NO. - the thumbnail cache is invalidated Note that the resource fork of the file is considered content, so this version data should change when either the data fork or the resource fork changes.
func (*NSFileProviderItemVersion) InitWithContentVersionMetadataVersion ¶
func (o *NSFileProviderItemVersion) InitWithContentVersionMetadataVersion(contentVersion *foundation.NSData, metadataVersion *foundation.NSData) *NSFileProviderItemVersion
Items versions have two distinct components, one for the file contents and one for metadata. Components are limited to 128 bytes in size.
func (*NSFileProviderItemVersion) MetadataVersion ¶
func (o *NSFileProviderItemVersion) MetadataVersion() *foundation.NSData
Version data for the metadata of the item, i.e everything but the data fork and the resource fork. The system will store this version, but otherwise ignore it: - metadata changes on an item will be applied even if the metadataVersion remains unchanged - if the metadata version changes without any corresponding observable changes in the metadata returned to the system, the system will simply store the updated metadata version (to return it as the base version of a possible future change request).
type NSFileProviderKnownFolderLocation ¶
type NSFileProviderKnownFolderLocation struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderknownfolderlocation
func NSFileProviderKnownFolderLocationFromID ¶
func NSFileProviderKnownFolderLocationFromID(id objc.ID) *NSFileProviderKnownFolderLocation
func (*NSFileProviderKnownFolderLocation) InitWithExistingItemIdentifier ¶
func (o *NSFileProviderKnownFolderLocation) InitWithExistingItemIdentifier(existingItemIdentifier *foundation.NSString) *NSFileProviderKnownFolderLocation
Initialize a location with the item identifier of a folder that already exists on the server. If the known folder already exists on the server, the provider can specify the exact identifier of the item that needs to be used to back the known folder.
func (*NSFileProviderKnownFolderLocation) InitWithParentItemIdentifierFilename ¶
func (o *NSFileProviderKnownFolderLocation) InitWithParentItemIdentifierFilename(parentItemIdentifier *foundation.NSString, filename *foundation.NSString) *NSFileProviderKnownFolderLocation
Initialize a location with the filename of the folder in a specified parent. When replicating a known folder the system will reuse a folder located at the specified filename within the parent if one exists, or create a new item at this location if none exists yet.
type NSFileProviderKnownFolderLocations ¶
type NSFileProviderKnownFolderLocations struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderknownfolderlocations
func NSFileProviderKnownFolderLocationsFromID ¶
func NSFileProviderKnownFolderLocationsFromID(id objc.ID) *NSFileProviderKnownFolderLocations
func (*NSFileProviderKnownFolderLocations) DesktopLocation ¶
func (o *NSFileProviderKnownFolderLocations) DesktopLocation() *NSFileProviderKnownFolderLocation
Candidate item for ~/Desktop For user experience reasons, it is strongly recommended to name the target folder "Desktop".
func (*NSFileProviderKnownFolderLocations) DocumentsLocation ¶
func (o *NSFileProviderKnownFolderLocations) DocumentsLocation() *NSFileProviderKnownFolderLocation
Candidate item for ~/Documents For user experience reasons, it is strongly recommended to name the target folder "Documents".
func (*NSFileProviderKnownFolderLocations) Init ¶
func (o *NSFileProviderKnownFolderLocations) Init() *NSFileProviderKnownFolderLocations
func (*NSFileProviderKnownFolderLocations) SetDesktopLocation ¶
func (o *NSFileProviderKnownFolderLocations) SetDesktopLocation(desktopLocation *NSFileProviderKnownFolderLocation)
func (*NSFileProviderKnownFolderLocations) SetDocumentsLocation ¶
func (o *NSFileProviderKnownFolderLocations) SetDocumentsLocation(documentsLocation *NSFileProviderKnownFolderLocation)
func (*NSFileProviderKnownFolderLocations) SetShouldCreateBinaryCompatibilitySymlink ¶
func (o *NSFileProviderKnownFolderLocations) SetShouldCreateBinaryCompatibilitySymlink(shouldCreateBinaryCompatibilitySymlink bool)
func (*NSFileProviderKnownFolderLocations) ShouldCreateBinaryCompatibilitySymlink ¶
func (o *NSFileProviderKnownFolderLocations) ShouldCreateBinaryCompatibilitySymlink() bool
Specify whether the system should create a binary compatibility symlink folders. If YES, the system creates a symlink from the logical location of the folder in the domain sync root to the known folder location. This symlink allows any app that would have hardcoded the previous location of the folder to still work after enabling the feature. Default value is YES.
type NSFileProviderKnownFolderSupporting ¶
type NSFileProviderKnownFolderSupporting interface {
GetKnownFolderLocationsCompletionHandler(knownFolders NSFileProviderKnownFolders, completionHandler func(*NSFileProviderKnownFolderLocations, unsafe.Pointer))
}
NSFileProviderKnownFolderSupporting wraps the ObjC protocol NSFileProviderKnownFolderSupporting.
type NSFileProviderKnownFolders ¶
type NSFileProviderKnownFolders uint64
const ( NSFileProviderDesktop NSFileProviderKnownFolders = 1 NSFileProviderDocuments NSFileProviderKnownFolders = 2 )
func (NSFileProviderKnownFolders) String ¶
func (e NSFileProviderKnownFolders) String() string
type NSFileProviderManager ¶
type NSFileProviderManager struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileprovidermanager
func NSFileProviderManagerFromID ¶
func NSFileProviderManagerFromID(id objc.ID) *NSFileProviderManager
func NSFileProviderManagerManagerForDomain ¶
func NSFileProviderManagerManagerForDomain(domain *NSFileProviderDomain) *NSFileProviderManager
Return the manager for the specified domain.
func (*NSFileProviderManager) ClaimKnownFoldersLocalizedReasonCompletionHandler ¶
func (o *NSFileProviderManager) ClaimKnownFoldersLocalizedReasonCompletionHandler(knownFolders *NSFileProviderKnownFolderLocations, localizedReason *foundation.NSString, completionHandler func(unsafe.Pointer))
Request the specified known folders to be synced by this domain. This method allows the provider to claim a set of known folders described by the non-null properties of the knownFolders parameter. The system will only enable sync for those folders in that domain if the set of locations is valid and if the user agrees. This API should only be called as a result of the user requesting, via UI in the provider's application, that they wish to start syncing the Desktop and Document folders. If the provider chooses to implement a UI which invokes this API, the provider should also implement a UI for the user to request to stop syncing the Desktop and Document folders, using the `-[NSFileProviderManager releaseKnownFolders:localizedReason:completionHandler:]` method. The reason specified in this call is a custom string that the provider can pass and will be presented to the user as a way to explain why it is claiming those known folders. One suggested phrasing would be: > Keep your Desktop & Documents in sync with <Provider name> and access them from other devices and from <Provider website>. If the user denies the transition of the known folders, the call will fail with `NSUserCancelledError`. The call will fail if: - one or more locations are not folders - multiple locations are backed by the same folder - a known folder doesn't live on the same volume as the root of the domain - the known folders don't have the same parent folder - ... Currently, only claiming both ~/Desktop and ~/Documents together is allowed.
func (*NSFileProviderManager) DisconnectWithReasonOptionsCompletionHandler ¶
func (o *NSFileProviderManager) DisconnectWithReasonOptionsCompletionHandler(localizedReason *foundation.NSString, options NSFileProviderManagerDisconnectionOptions, completionHandler func(unsafe.Pointer))
func (*NSFileProviderManager) EnumeratorForMaterializedItems ¶
func (o *NSFileProviderManager) EnumeratorForMaterializedItems() NSFileProviderEnumerator
Returns an enumerator for the set of materialized items. When calling -[NSFileProviderEnumerator enumerateItemsForObserver:startingAtPage:] on the returned enumerator, pass the result of [NSData new] as the starting page. The sorting page constants (NSFileProviderInitialPageSortedByName and NSFileProviderInitialPageSortedByDate) will not influence the order of the items enumerated from the materialized set. This enumerator is unlike other enumerators because the roles of the system and the app/extension are reversed: - The system enumerates the working set after the extension calls 'signalEnumeratorForContainerItemIdentifier'; - The app/extension enumerates the materialized set after the system calls 'materializedItemsDidChangeWithCompletionHandler'.
func (*NSFileProviderManager) EnumeratorForPendingItems ¶
func (o *NSFileProviderManager) EnumeratorForPendingItems() NSFileProviderPendingSetEnumerator
Returns an enumerator for the set of pending items. This enumerator behaves like the materialized set enumerator. On later modifications in the set, the system will call 'pendingItemsDidChangeWithCompletionHandler'.
func (*NSFileProviderManager) EvictItemWithIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) EvictItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
Request that the system remove an item from its cache. When called on a file, the file will be made dataless. When called on a directory, first each of the directory's children will be evicted (child files are made dataless, child directories are recursively evicted). Then the directory itself will be made dataless. If a non-evictable child is encountered, eviction will stop immediately and the completionHandler will be called with the NSFileProviderErrorNonEvictableChildren error. The error will include information on why and which children could not be evicted in -[NSError underlyingErrors]. The materialization state of the remaining items may be either materialized or evicted, depending on the traversal order. The completion handler is called after the items have been evicted from disk or immediately when an error occurs. Eviction might fail with the following errors : - NSFileProviderErrorDomain.NSFileProviderErrorUnsyncedEdits if the item had non-uploaded changes. - NSFileProviderErrorDomain.NSFileProviderErrorNonEvictable if the item has been marked as non-purgeable by the provider. - NSPOSIXErrorDomain.EBUSY : if the item has open file descriptors on it. - NSPOSIXErrorDomain.EMLINK : if the item has several hardlinks. - other NSPOSIXErrorDomain error codes if the system was unable to access or manipulate the corresponding file.
func (*NSFileProviderManager) GetServiceWithNameItemIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) GetServiceWithNameItemIdentifierCompletionHandler(serviceName *foundation.NSString, itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer, unsafe.Pointer))
Retrieve the service with the specified named for the specified item.
func (*NSFileProviderManager) GetUserVisibleURLForItemIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) GetUserVisibleURLForItemIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(*foundation.NSURL, unsafe.Pointer))
Return the security scoped URL to the user visible location for an item identifier. The caller must use file coordination (see NSFileCoordinator) if it wishes to read the content or list the children of the URL. The caller should not try to manipulate files in the user visible location. All changes coming from the provider should go through updates in the working set that will be applied to the user visible items by the system. The location may differ from the logical parentURL/filename. If an item on disk cannot be assigned the requested name (e.g. because the local file system has different case collision rules from the provider), one of the items can be assigned a different local name. In that case, the "com.apple.fileprovider.before-bounce#PX" extended attribute will contain the filename before collision resolution. This attribute is only set if the item has been assigned a different local name following a collision. Such local names are not synced up to the provider; the purpose of the attribute is to enable consistency checkers to detect this case. Before accessing the content of the returned URL, the caller must call `-[NSURL startAccessingSecurityScopedResource] on the returned URL and call `-[NSURL stopAccessingSecurityScopedResource]` when done accessing the content. The returned URL grants read-write access to the user visible location for the corresponding item. On iOS, for replicated domains, the extension process will never be granted access to the user visible location, this function will always fail with `NSFileReadNoPermissionError`.
func (*NSFileProviderManager) GlobalProgressForKind ¶
func (o *NSFileProviderManager) GlobalProgressForKind(kind *foundation.NSString) *foundation.NSProgress
Returns the global progress for the specified kind of operations This progress tracks all the ongoing kind of operations (from disk to the provider). Uploading operations are the operations from disk to the provider. Downloading operations are the operations from the provider to the disk. The global progress exposes the two following data: - Number of items with an ongoing matching kind operation along with the grand total; - Number of bytes already transferred along with the total amount of bytes to transfer. `totalUnitCount` will only be reset when there are no operations left. If new operations of the matching kind arrive while the global progress is already ongoing, they will just be summed to the existing global progress. By default, when no matching kind operations are active, the progress has its values set to 1 and its state set to finished. The progress will be updated on the main queue. It is to be retained by the caller and to be observed through KVO. The two only supported values for kind are: - NSProgressFileOperationKindUploading - NSProgressFileOperationKindDownloading The returned progress will have its fileOperationKind property set.
func (*NSFileProviderManager) ListAvailableTestingOperationsWithError ¶
func (o *NSFileProviderManager) ListAvailableTestingOperationsWithError() (*foundation.NSArray[NSFileProviderTestingOperation], error)
List the available operations. This lists all of the operations that are ready to be scheduled by the system. The system waits for all the pending disk and working set updates to be known before returning. The operations that are returned may become invalid if the system receives new disk or working set events, or if some operation are scheduled using -runTestingOperations:error:.
func (*NSFileProviderManager) ReconnectWithCompletionHandler ¶
func (o *NSFileProviderManager) ReconnectWithCompletionHandler(completionHandler func(unsafe.Pointer))
func (*NSFileProviderManager) RegisterURLSessionTaskForItemWithIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) RegisterURLSessionTaskForItemWithIdentifierCompletionHandler(task *foundation.NSURLSessionTask, identifier *foundation.NSString, completion func(unsafe.Pointer))
Registers the given NSURLSessionTask to be responsible for the specified item. A given item can only have one task registered at a time. The task must be suspended at the time of calling. The task's progress is displayed on the item when the task is executed.
func (*NSFileProviderManager) ReimportItemsBelowItemWithIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) ReimportItemsBelowItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
Notify the system that the itemIdentifiers known by the system are not valid anymore. This can be called by an extension in case it has lost track of its synchronisation state and as a consequence is not able to guarantee the stability of the itemIdentifiers anymore. In that case, the system will trigger a scan of any data that is cached on disk and call createItemBasedOnTemplate with the special NSFileProviderCreateItemMayAlreadyExist option so that the extension can specify the new itemIdentifier for those items. The provided item identifier is inclusive, meaning the specified item will be re-import as well as any children in case it is a container. In case the extension has lost its synchronisation state but is still able to guarantee the stability of the itemIdentifiers, it should make sure that querying the working set enumerator with an anchor that predates the synchronisation loss will cause a NSFileProviderErrorSyncAnchorExpired error. In case the extension has lost its synchronisation state and is not interested in preserving the data cached on disk, it can remove and re-add the affected domain. The completion handler is called as soon as the reimport is initiated and does not not reflect the end of the import. When the import of the file hierarchy is finished, the system calls -[NSFileProviderExtension importDidFinishWithCompletionHandler:]. In some circumstances, in particular in case the requested item is the root item, calling reimport will cause the system to stop the extension process. If the call is initiated from the extension, the system does not guarantee that the completion handler will be called before the extension is stopped. When called on the root item, reimport will cause the system to rebuild its backing store for the domain. See `-[NSFileProviderDomain backingStoreIdentity]`. If this method succeeds, the system will reimport at least the requested sub-tree, but may import more. If the requested item has no on-disk representation, the completion handler will be called with a NSFileProviderErrorNoSuchItem error. The same error will be reported if the reimport request happens quickly after a previous import / reimport and the corresponding item hasn't been reimported yet.
func (*NSFileProviderManager) ReleaseKnownFoldersLocalizedReasonCompletionHandler ¶
func (o *NSFileProviderManager) ReleaseKnownFoldersLocalizedReasonCompletionHandler(knownFolders NSFileProviderKnownFolders, localizedReason *foundation.NSString, completionHandler func(unsafe.Pointer))
Request that the system stops replicating the specified known folders in the domain. This call can be used by the provider to immediately disable replication of the specified known folders.
func (*NSFileProviderManager) RequestDiagnosticCollectionForItemWithIdentifierErrorReasonCompletionHandler ¶
func (o *NSFileProviderManager) RequestDiagnosticCollectionForItemWithIdentifierErrorReasonCompletionHandler(itemIdentifier *foundation.NSString, errorReason unsafe.Pointer, completionHandler func(unsafe.Pointer))
Request diagnostics collection for the item. This will prompt the user about an issue with the sync in the provider and ask their permission to collection diagnostic information and to send them to Apple for further analysis. This call is to be used wisely with care given there's global throttling on it preventing spamming the users. Furthermore it should be used in collaboration with Apple when you detect a misbehavior in the sync in your provider likely caused by a system bug and you need to work with Apple in order to resolve it. This will return whether the call was allowed or not - not if it suceed This method will only return an error if the user was not on a Seed build It is mandatory to provide an error for the item why the collection is requested. The error won't be shown to the user (a generic message will be shown instead) It will surface in the generated report though It is important to note that even if the call is allowed, it might not trigger diagnostic collection nor prompt to the user depending on the system state and other throttling parameters
func (*NSFileProviderManager) RequestDownloadForItemWithIdentifierRequestedRangeCompletionHandler ¶
func (o *NSFileProviderManager) RequestDownloadForItemWithIdentifierRequestedRangeCompletionHandler(itemIdentifier *foundation.NSString, rangeToMaterialize foundation.NSRange, completionHandler func(unsafe.Pointer))
Request that the system schedule a download for an item. The completion handler is called when the system acknowledges the download request, or with an error indicating why it didn't (e.g NSFileProviderErrorNoSuchItem.) The system will then call -fetchContentsForItemWithIdentifier at the earliest convenient time. Set rangeToMaterialize to NSMakeRange(offset, nbytes) to request a partial download. The system will then invoke -fetchPartialContentsForItemWithIdentifier instead of fetchContentsForItemWithIdentifier. For a full download, set rangeToMaterialize to NSMakeRange(NSNotFound, 0). -[NSFileProviderManager evictItemWithIdentifier:completionHandler:] must be called on a partially materialized file before requesting an extent to be downloaded from a later version of the file. This method cannot be used to download directories recursively. When invoked on a dataless directory, it will trigger an enumeration of the directory, causing a materialization of the directory one level down only. All the children of the directory will remain dataless after the enumeration.
func (*NSFileProviderManager) RunTestingOperationsError ¶
func (o *NSFileProviderManager) RunTestingOperationsError(operations *foundation.NSArray[NSFileProviderTestingOperation]) (*foundation.NSDictionary[NSFileProviderTestingOperation, objc.ID], error)
Run a set of operations. Ask the system to schedule the execution of the listed operations. The system will wait until all those operations have completed and report a per-operation error in case an operation fails.
func (*NSFileProviderManager) SignalEnumeratorForContainerItemIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) SignalEnumeratorForContainerItemIdentifierCompletionHandler(containerItemIdentifier *foundation.NSString, completion func(unsafe.Pointer))
Call this method either in the app or in the extension to trigger an enumeration, typically in response to a push. When using NSFileProviderExtension, the system will enumerate containers while the user is viewing them in the UI. If there are changes to the container while an enumerator is open, call this method with the identifier of that container. This will trigger another call to -[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:] on that enumerator, and the UI will be refreshed, giving the user live updates on the presented enumeration. If there are changes in the working set, call this method with containerItemIdentifier set to NSFileProviderWorkingSetContainerItemIdentifier, even if there is no live enumeration for the working set container. When using NSFileProviderReplicatedExtension, only call this method with NSFileProviderWorkingSetContainerItemIdentifier. Other container identifiers are ignored. The system will automatically propagate working set changes to the UI, without explicitly signaling the containers currently being viewed in the UI. In addition to using this method, your application/extension can register for pushes using the PKPushTypeFileProvider push type. Pushes of the form { "container-identifier": "<identifier>", "domain": "<domain identifier>" } with a topic of "<your application identifier>.pushkit.fileprovider" will be translated into a call to signalEnumeratorForContainerItemIdentifier:completionHandler:.
func (*NSFileProviderManager) SignalErrorResolvedCompletionHandler ¶
func (o *NSFileProviderManager) SignalErrorResolvedCompletionHandler(error_ unsafe.Pointer, completionHandler func(unsafe.Pointer))
Calling this method will cause the system to cancel throttling on every item which has been throttled due to the given error. This call supports the following errors: - NSFileProviderErrorNotAuthenticated - NSFileProviderErrorInsufficientQuota - NSFileProviderErrorServerUnreachable - NSFileProviderErrorCannotSynchronize - NSFileProviderErrorExcludedFromSync
func (*NSFileProviderManager) StateDirectoryURLWithError ¶
func (o *NSFileProviderManager) StateDirectoryURLWithError() (*foundation.NSURL, error)
A directory suitable for storing state information for the domain. The returned URL is guaranteed to be on the same volume as the user visible URL and the temporary URL, making sure the system can atomatically clone/move files from that location to the user visible URL. The caller is responsible for managing the security scope of the returned URL. When syncing a domain on an external volume, all information about the sync state must be kept in this directory if the volume is to be shared between multiple machines. If the system cannot find a suitable directory, this call will fail. This could happen e.g. if the domain does not exist or is in instance of initialization. This call will not fail when called from the extension process with an active instance of the extension for that domain unless the domain is being setup for the very first time (meaning it never existed). Removing the domain will remove the corresponding directory along with it.
func (*NSFileProviderManager) TemporaryDirectoryURLWithError ¶
func (o *NSFileProviderManager) TemporaryDirectoryURLWithError() (*foundation.NSURL, error)
A temporary directory suitable to store files that will be exchanged with the system. The returned URL is guaranteed to be on the same volume as the user visible URL, making sure the system can atomatically clone/move files from that location to the user visible URL. The provider can also use that directory as a target for moves and clones of content URL passed to createItemBasedOnTemplate or modifyItem. If the system cannot find a suitable directory, this calls will fail. This could happen e.g. if the domain does not exist or is in instance of initialization. This call succeeds when called from the extension process with an instance of the extension for the domain unless domain was disconnected by `-[NSFileProviderExternalVolumeHandling shouldConnectExternalDomainWithCompletionHandler:]`. It can also fail in the extension process if the domain (external) is being setup for the very first time (meaning it never existed).
func (*NSFileProviderManager) WaitForChangesOnItemsBelowItemWithIdentifierCompletionHandler ¶
func (o *NSFileProviderManager) WaitForChangesOnItemsBelowItemWithIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))
Wait for all changes on disk in the sub-hierarchy of the item to be acknowledged by the extension. This call can be used to guarantee operation ordering in a sub-hierarchy of the provider. The completion handler is called when all the changes for descendents of the item have been acknowledged by the extension. If any error is met during that process, an error will be raised, in which case the caller should not assume all the changes have been received. This call will only wait for changes affecting items that were already descendents of the requested item in the provider, or items that have been newly created on disk. It will not wait for items that are already known from the provider and are being moved in the directory. As a consequence, that call can be used from within a call to -[NSFileProviderReplicatedExtension modifyItem:baseVersion:changedFields:contents:options:completionHandler:]. Also note that the call will return immediately on items that are not directories. In case a change cannot be applied to the provider, the call will fail with NSFileProviderErrorCannotSynchronize including the NSFileProviderErrorItemKey with the identifier of the item that could not be synced if that item is known by the provider.
func (*NSFileProviderManager) WaitForStabilizationWithCompletionHandler ¶
func (o *NSFileProviderManager) WaitForStabilizationWithCompletionHandler(completionHandler func(unsafe.Pointer))
Wait for stabilization of the domain. The system will wait until it is caught up with the file system's changes up to the time of the call, then wait until it is caught up with the provider's changes up to the time of the call. The completion handler is called when both sets of changes are caught up to at least the time of the call. This is useful to enforce a consistent state for testing.
type NSFileProviderManagerDisconnectionOptions ¶
type NSFileProviderManagerDisconnectionOptions uint64
const (
NSFileProviderManagerDisconnectionOptionsTemporary NSFileProviderManagerDisconnectionOptions = 1
)
func (NSFileProviderManagerDisconnectionOptions) String ¶
func (e NSFileProviderManagerDisconnectionOptions) String() string
type NSFileProviderMaterializationFlags ¶
type NSFileProviderMaterializationFlags uint64
const ( // By default, the system will track which parts of the returned file are sparse; those parts will remain non-materialized and trigger subsequent calls to the materialization methods on access. Returning this flag will instead cause the entire file to be marked as materialized. This is useful if the resulting file is known to contain sparse parts, and all the remaining parts have been filled in. This flag is ignored if the provided range doesn't cover the entire file (ie. [0, EOF]). This flag is not functional prior to macOS 13.3. NSFileProviderMaterializationFlagsKnownSparseRanges NSFileProviderMaterializationFlags = 1 )
func (NSFileProviderMaterializationFlags) String ¶
func (e NSFileProviderMaterializationFlags) String() string
type NSFileProviderModifyItemOptions ¶
type NSFileProviderModifyItemOptions uint64
const ( // An option that indicates the changes may already exist in your remote storage. This option applies when moving the item to a location where it may refer to an item that already exists. This situation may occur when merging two directories together. NSFileProviderModifyItemMayAlreadyExist NSFileProviderModifyItemOptions = 1 // An option to fail an upload in the event of a version conflict. If you adopt this option, and an uploaded item's base version doesn't match the version on the server, fail and return “NSFileProviderError/localVersionConflictingWithServer“ (Swift) or “NSFileProviderErrorCode/NSFileProviderErrorLocalVersionConflictingWithServer“ (Objective-C) in your implementation of `modifyItem`. To support the fail-on-conflict behavior in your file provider, indicate the support by adding the following key/value pair to the extension's Info pane. “` <key>NSExtension</key> <dict> <key>NSExtensionFileProviderSupportsFailingUploadOnConflict</key> <true/> </dict> “` NSFileProviderModifyItemFailOnConflict NSFileProviderModifyItemOptions = 2 // An option to require the upload to complete before calling the completion handler. This option allows the calling application to know when the uploaded version of the file is on the server. NSFileProviderModifyItemIsImmediateUploadRequestByPresentingApplication NSFileProviderModifyItemOptions = 4 )
func (NSFileProviderModifyItemOptions) String ¶
func (e NSFileProviderModifyItemOptions) String() string
type NSFileProviderPartialContentFetching ¶
type NSFileProviderPartialContentFetching interface {
FetchPartialContentsForItemWithIdentifierVersionRequestMinimalRangeAligningToOptionsCompletionHandler(itemIdentifier *foundation.NSString, requestedVersion *NSFileProviderItemVersion, request *NSFileProviderRequest, requestedRange foundation.NSRange, alignment uint, options NSFileProviderFetchContentsOptions, completionHandler objc.Block) *foundation.NSProgress
}
NSFileProviderPartialContentFetching wraps the ObjC protocol NSFileProviderPartialContentFetching.
type NSFileProviderPendingSetEnumerator ¶
type NSFileProviderPendingSetEnumerator interface {
NSFileProviderEnumerator
DomainVersion() *NSFileProviderDomainVersion
RefreshInterval() float64
IsMaximumSizeReached() bool
}
NSFileProviderPendingSetEnumerator wraps the ObjC protocol NSFileProviderPendingSetEnumerator.
type NSFileProviderReplicatedExtension ¶
type NSFileProviderReplicatedExtension interface {
NSFileProviderEnumerating
InitWithDomain(domain *NSFileProviderDomain) unsafe.Pointer
Invalidate()
ItemForIdentifierRequestCompletionHandler(identifier *foundation.NSString, request *NSFileProviderRequest, completionHandler objc.Block) *foundation.NSProgress
FetchContentsForItemWithIdentifierVersionRequestCompletionHandler(itemIdentifier *foundation.NSString, requestedVersion *NSFileProviderItemVersion, request *NSFileProviderRequest, completionHandler objc.Block) *foundation.NSProgress
CreateItemBasedOnTemplateFieldsContentsOptionsRequestCompletionHandler(itemTemplate NSFileProviderItem, fields NSFileProviderItemFields, url *foundation.NSURL, options NSFileProviderCreateItemOptions, request *NSFileProviderRequest, completionHandler objc.Block) *foundation.NSProgress
ModifyItemBaseVersionChangedFieldsContentsOptionsRequestCompletionHandler(item NSFileProviderItem, version *NSFileProviderItemVersion, changedFields NSFileProviderItemFields, newContents *foundation.NSURL, options NSFileProviderModifyItemOptions, request *NSFileProviderRequest, completionHandler objc.Block) *foundation.NSProgress
DeleteItemWithIdentifierBaseVersionOptionsRequestCompletionHandler(identifier *foundation.NSString, version *NSFileProviderItemVersion, options NSFileProviderDeleteItemOptions, request *NSFileProviderRequest, completionHandler func(unsafe.Pointer)) *foundation.NSProgress
}
NSFileProviderReplicatedExtension wraps the ObjC protocol NSFileProviderReplicatedExtension.
type NSFileProviderRequest ¶
type NSFileProviderRequest struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderrequest
func NSFileProviderRequestFromID ¶
func NSFileProviderRequestFromID(id objc.ID) *NSFileProviderRequest
func (*NSFileProviderRequest) DomainVersion ¶
func (o *NSFileProviderRequest) DomainVersion() *NSFileProviderDomainVersion
The version of the domain when the event that triggered the request was observed. If the extension doesn't implement the NSFileProviderDomainState protocol, this will be nil.
func (*NSFileProviderRequest) IsFileViewerRequest ¶
func (o *NSFileProviderRequest) IsFileViewerRequest() bool
The request was made by Finder or one of its helpers. This is only valid for NSFileProviderRequest objects passed to these methods: - [NSFileProviderEnumerating enumeratorForContainerItemIdentifier:] - [NSFileProviderReplicatedExtension fetchContentsForItemWithIdentifier:] For sync up methods (createItem/modifyItem/deleteItem), the system does not know which actor made the modifications to the file, so it cannot supply this information.
func (*NSFileProviderRequest) IsSystemRequest ¶
func (o *NSFileProviderRequest) IsSystemRequest() bool
The request was made by the sync system, e.g. to update a file to its latest version after a remote update was pushed. This is only valid for NSFileProviderRequest objects passed to these methods: - [NSFileProviderEnumerating enumeratorForContainerItemIdentifier:] - [NSFileProviderReplicatedExtension fetchContentsForItemWithIdentifier:] For sync up methods (createItem/modifyItem/deleteItem), the system does not know which actor made the modifications to the file, so it cannot supply this information.
func (*NSFileProviderRequest) RequestingExecutable ¶
func (o *NSFileProviderRequest) RequestingExecutable() *foundation.NSURL
The URL of the requesting executable. This will always be nil unless both an MDM profile key is set, and the provider's application is installed by an MDM profile.
type NSFileProviderSearchEnumerationObserver ¶
type NSFileProviderSearchEnumerationObserver interface {
DidEnumerateSearchResults(searchResults *foundation.NSArray[NSFileProviderSearchResult])
FinishEnumeratingUpToPage(nextPage *foundation.NSData)
FinishEnumeratingWithError(error_ unsafe.Pointer)
MaximumNumberOfResultsPerPage() int
}
NSFileProviderSearchEnumerationObserver wraps the ObjC protocol NSFileProviderSearchEnumerationObserver.
type NSFileProviderSearchEnumerator ¶
type NSFileProviderSearchEnumerator interface {
Invalidate()
EnumerateSearchResultsForObserverStartingAtPage(observer NSFileProviderSearchEnumerationObserver, page *foundation.NSData)
}
NSFileProviderSearchEnumerator wraps the ObjC protocol NSFileProviderSearchEnumerator.
type NSFileProviderSearchResult ¶
type NSFileProviderSearchResult interface {
ItemIdentifier() *foundation.NSString
Filename() *foundation.NSString
CreationDate() *foundation.NSDate
ContentModificationDate() *foundation.NSDate
LastUsedDate() *foundation.NSDate
ContentType() *uniformtypeidentifiers.UTType
DocumentSize() *foundation.NSNumber
}
NSFileProviderSearchResult wraps the ObjC protocol NSFileProviderSearchResult.
type NSFileProviderSearching ¶
type NSFileProviderSearching interface {
SearchEnumeratorForStringSearchRequest(request *NSFileProviderStringSearchRequest) NSFileProviderSearchEnumerator
}
NSFileProviderSearching wraps the ObjC protocol NSFileProviderSearching.
type NSFileProviderServiceSource ¶
type NSFileProviderServiceSource interface {
MakeListenerEndpointAndReturnError() (*foundation.NSXPCListenerEndpoint, error)
ServiceName() *foundation.NSString
}
NSFileProviderServiceSource wraps the ObjC protocol NSFileProviderServiceSource.
type NSFileProviderServicing ¶
type NSFileProviderServicing interface {
SupportedServiceSourcesForItemIdentifierCompletionHandler(itemIdentifier *foundation.NSString, completionHandler func(*foundation.NSArray[NSFileProviderServiceSource], unsafe.Pointer)) *foundation.NSProgress
}
NSFileProviderServicing wraps the ObjC protocol NSFileProviderServicing.
type NSFileProviderStringSearchRequest ¶
type NSFileProviderStringSearchRequest struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/fileprovider/nsfileproviderstringsearchrequest
func NSFileProviderStringSearchRequestFromID ¶
func NSFileProviderStringSearchRequestFromID(id objc.ID) *NSFileProviderStringSearchRequest
func (*NSFileProviderStringSearchRequest) DesiredNumberOfResults ¶
func (o *NSFileProviderStringSearchRequest) DesiredNumberOfResults() int
How many results the system is requesting. This is a hint to the extension, to help avoid unnecessary work. The extension may return more results than this.
func (*NSFileProviderStringSearchRequest) Query ¶
func (o *NSFileProviderStringSearchRequest) Query() *foundation.NSString
A plaintext string, representing the query the user entered into the system search UI.
type NSFileProviderTestingChildrenEnumeration ¶
type NSFileProviderTestingChildrenEnumeration interface {
NSFileProviderTestingOperation
Side() NSFileProviderTestingOperationSide
ItemIdentifier() *foundation.NSString
}
NSFileProviderTestingChildrenEnumeration wraps the ObjC protocol NSFileProviderTestingChildrenEnumeration.
type NSFileProviderTestingCollisionResolution ¶
type NSFileProviderTestingCollisionResolution interface {
NSFileProviderTestingOperation
Side() NSFileProviderTestingOperationSide
RenamedItem() NSFileProviderItem
}
NSFileProviderTestingCollisionResolution wraps the ObjC protocol NSFileProviderTestingCollisionResolution.
type NSFileProviderTestingContentFetch ¶
type NSFileProviderTestingContentFetch interface {
NSFileProviderTestingOperation
Side() NSFileProviderTestingOperationSide
ItemIdentifier() *foundation.NSString
}
NSFileProviderTestingContentFetch wraps the ObjC protocol NSFileProviderTestingContentFetch.
type NSFileProviderTestingCreation ¶
type NSFileProviderTestingCreation interface {
NSFileProviderTestingOperation
TargetSide() NSFileProviderTestingOperationSide
SourceItem() NSFileProviderItem
DomainVersion() *NSFileProviderDomainVersion
}
NSFileProviderTestingCreation wraps the ObjC protocol NSFileProviderTestingCreation.
type NSFileProviderTestingDeletion ¶
type NSFileProviderTestingDeletion interface {
NSFileProviderTestingOperation
TargetSide() NSFileProviderTestingOperationSide
SourceItemIdentifier() *foundation.NSString
TargetItemIdentifier() *foundation.NSString
TargetItemBaseVersion() *NSFileProviderItemVersion
DomainVersion() *NSFileProviderDomainVersion
}
NSFileProviderTestingDeletion wraps the ObjC protocol NSFileProviderTestingDeletion.
type NSFileProviderTestingIngestion ¶
type NSFileProviderTestingIngestion interface {
NSFileProviderTestingOperation
Side() NSFileProviderTestingOperationSide
ItemIdentifier() *foundation.NSString
Item() NSFileProviderItem
}
NSFileProviderTestingIngestion wraps the ObjC protocol NSFileProviderTestingIngestion.
type NSFileProviderTestingLookup ¶
type NSFileProviderTestingLookup interface {
NSFileProviderTestingOperation
Side() NSFileProviderTestingOperationSide
ItemIdentifier() *foundation.NSString
}
NSFileProviderTestingLookup wraps the ObjC protocol NSFileProviderTestingLookup.
type NSFileProviderTestingModification ¶
type NSFileProviderTestingModification interface {
NSFileProviderTestingOperation
TargetSide() NSFileProviderTestingOperationSide
SourceItem() NSFileProviderItem
TargetItemIdentifier() *foundation.NSString
TargetItemBaseVersion() *NSFileProviderItemVersion
ChangedFields() NSFileProviderItemFields
DomainVersion() *NSFileProviderDomainVersion
}
NSFileProviderTestingModification wraps the ObjC protocol NSFileProviderTestingModification.
type NSFileProviderTestingOperation ¶
type NSFileProviderTestingOperation interface {
AsIngestion() NSFileProviderTestingIngestion
AsLookup() NSFileProviderTestingLookup
AsCreation() NSFileProviderTestingCreation
AsModification() NSFileProviderTestingModification
AsDeletion() NSFileProviderTestingDeletion
AsContentFetch() NSFileProviderTestingContentFetch
AsChildrenEnumeration() NSFileProviderTestingChildrenEnumeration
AsCollisionResolution() NSFileProviderTestingCollisionResolution
Type() NSFileProviderTestingOperationType
}
NSFileProviderTestingOperation wraps the ObjC protocol NSFileProviderTestingOperation.
type NSFileProviderTestingOperationSide ¶
type NSFileProviderTestingOperationSide uint64
const ( // The operation reads or writes the disk. NSFileProviderTestingOperationSideDisk NSFileProviderTestingOperationSide = 0 // The operation reads or writes the file provider extension. NSFileProviderTestingOperationSideFileProvider NSFileProviderTestingOperationSide = 1 )
func (NSFileProviderTestingOperationSide) String ¶
func (e NSFileProviderTestingOperationSide) String() string
type NSFileProviderTestingOperationType ¶
type NSFileProviderTestingOperationType int64
const ( NSFileProviderTestingOperationTypeIngestion NSFileProviderTestingOperationType = 0 NSFileProviderTestingOperationTypeLookup NSFileProviderTestingOperationType = 1 NSFileProviderTestingOperationTypeCreation NSFileProviderTestingOperationType = 2 NSFileProviderTestingOperationTypeModification NSFileProviderTestingOperationType = 3 NSFileProviderTestingOperationTypeDeletion NSFileProviderTestingOperationType = 4 NSFileProviderTestingOperationTypeContentFetch NSFileProviderTestingOperationType = 5 NSFileProviderTestingOperationTypeChildrenEnumeration NSFileProviderTestingOperationType = 6 NSFileProviderTestingOperationTypeCollisionResolution NSFileProviderTestingOperationType = 7 )
func (NSFileProviderTestingOperationType) String ¶
func (e NSFileProviderTestingOperationType) String() string
type NSFileProviderThumbnailing ¶
type NSFileProviderThumbnailing interface {
FetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler(itemIdentifiers *foundation.NSArray[*foundation.NSString], size corefoundation.CGSize, perThumbnailCompletionHandler func(*foundation.NSString, *foundation.NSData, unsafe.Pointer), completionHandler func(unsafe.Pointer)) *foundation.NSProgress
}
NSFileProviderThumbnailing wraps the ObjC protocol NSFileProviderThumbnailing.
type NSFileProviderUserInteractionSuppressing ¶
type NSFileProviderUserInteractionSuppressing interface {
SetInteractionSuppressedForIdentifier(suppression bool, suppressionIdentifier *foundation.NSString)
IsInteractionSuppressedForIdentifier(suppressionIdentifier *foundation.NSString) bool
}
NSFileProviderUserInteractionSuppressing wraps the ObjC protocol NSFileProviderUserInteractionSuppressing.
type NSFileProviderVolumeUnsupportedReason ¶
type NSFileProviderVolumeUnsupportedReason uint64
const ( NSFileProviderVolumeUnsupportedReasonNone NSFileProviderVolumeUnsupportedReason = 0 NSFileProviderVolumeUnsupportedReasonUnknown NSFileProviderVolumeUnsupportedReason = 1 NSFileProviderVolumeUnsupportedReasonNonAPFS NSFileProviderVolumeUnsupportedReason = 2 NSFileProviderVolumeUnsupportedReasonNonEncrypted NSFileProviderVolumeUnsupportedReason = 4 NSFileProviderVolumeUnsupportedReasonReadOnly NSFileProviderVolumeUnsupportedReason = 8 NSFileProviderVolumeUnsupportedReasonNetwork NSFileProviderVolumeUnsupportedReason = 16 NSFileProviderVolumeUnsupportedReasonQuarantined NSFileProviderVolumeUnsupportedReason = 32 )
func (NSFileProviderVolumeUnsupportedReason) String ¶
func (e NSFileProviderVolumeUnsupportedReason) String() string
type NXMouseButton ¶
type NXMouseButton int64
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
type Os_clockid_t ¶
type Os_clockid_t int64
const (
OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)
func (Os_clockid_t) String ¶
func (e Os_clockid_t) String() string
type Ptrauth_key ¶
type Ptrauth_key int64
const ( Ptrauth_key_none Ptrauth_key = -1 Ptrauth_key_asia Ptrauth_key = 0 Ptrauth_key_asib Ptrauth_key = 1 Ptrauth_key_asda Ptrauth_key = 2 Ptrauth_key_asdb Ptrauth_key = 3 Ptrauth_key_process_independent_code Ptrauth_key = 0 Ptrauth_key_process_dependent_code Ptrauth_key = 1 Ptrauth_key_process_independent_data Ptrauth_key = 2 Ptrauth_key_process_dependent_data Ptrauth_key = 3 Ptrauth_key_return_address Ptrauth_key = 1 Ptrauth_key_frame_pointer Ptrauth_key = 3 Ptrauth_key_function_pointer Ptrauth_key = 0 Ptrauth_key_block_function Ptrauth_key = 0 Ptrauth_key_cxx_vtable_pointer Ptrauth_key = 2 Ptrauth_key_method_list_pointer Ptrauth_key = 2 Ptrauth_key_objc_isa_pointer Ptrauth_key = 2 Ptrauth_key_objc_super_pointer Ptrauth_key = 2 Ptrauth_key_objc_sel_pointer Ptrauth_key = 3 Ptrauth_key_objc_class_ro_pointer Ptrauth_key = 2 Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2 Ptrauth_key_init_fini_pointer Ptrauth_key = 0 )
func (Ptrauth_key) String ¶
func (e Ptrauth_key) String() string
type Qos_class_t ¶
type Qos_class_t uint32
const ( QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33 QOS_CLASS_USER_INITIATED Qos_class_t = 25 QOS_CLASS_DEFAULT Qos_class_t = 21 QOS_CLASS_UTILITY Qos_class_t = 17 QOS_CLASS_BACKGROUND Qos_class_t = 9 QOS_CLASS_UNSPECIFIED Qos_class_t = 0 )
func (Qos_class_t) String ¶
func (e Qos_class_t) String() string
type Virtual_memory_guard_exception_code_t ¶
type Virtual_memory_guard_exception_code_t int64
const ( KGUARD_EXC_DEALLOC_GAP Virtual_memory_guard_exception_code_t = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE Virtual_memory_guard_exception_code_t = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE Virtual_memory_guard_exception_code_t = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE Virtual_memory_guard_exception_code_t = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE Virtual_memory_guard_exception_code_t = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE Virtual_memory_guard_exception_code_t = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE Virtual_memory_guard_exception_code_t = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION Virtual_memory_guard_exception_code_t = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY Virtual_memory_guard_exception_code_t = 13 KGUARD_EXC_SEC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 99 KGUARD_EXC_SEC_COPY_DENIED Virtual_memory_guard_exception_code_t = 100 KGUARD_EXC_SEC_SHARING_DENIED Virtual_memory_guard_exception_code_t = 101 KGUARD_EXC_MTE_SYNC_FAULT Virtual_memory_guard_exception_code_t = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204 )
func (Virtual_memory_guard_exception_code_t) String ¶
func (e Virtual_memory_guard_exception_code_t) String() string
type Xpc_listener_create_flags_t ¶
type Xpc_listener_create_flags_t int64
const ( XPC_LISTENER_CREATE_NONE Xpc_listener_create_flags_t = 0 XPC_LISTENER_CREATE_INACTIVE Xpc_listener_create_flags_t = 1 XPC_LISTENER_CREATE_FORCE_MACH Xpc_listener_create_flags_t = 2 XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4 )
func (Xpc_listener_create_flags_t) String ¶
func (e Xpc_listener_create_flags_t) String() string
type Xpc_session_create_flags_t ¶
type Xpc_session_create_flags_t int64
const ( XPC_SESSION_CREATE_NONE Xpc_session_create_flags_t = 0 XPC_SESSION_CREATE_INACTIVE Xpc_session_create_flags_t = 1 XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2 )
func (Xpc_session_create_flags_t) String ¶
func (e Xpc_session_create_flags_t) String() string
Source Files
¶
- NSFileProviderDomain.go
- NSFileProviderDomainVersion.go
- NSFileProviderItemVersion.go
- NSFileProviderKnownFolderLocation.go
- NSFileProviderKnownFolderLocations.go
- NSFileProviderManager.go
- NSFileProviderRequest.go
- NSFileProviderStringSearchRequest.go
- doc.go
- fileprovider_enums.go
- fileprovider_externs.go
- fileprovider_protocols.go
- fileprovider_runtime.go
- fileprovider_structs.go