NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSFileProviderExtension(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSFileProviderExtension |
alloc() |
static NSFileProviderExtension |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
void |
createDirectoryWithNameInParentItemIdentifierCompletionHandler(java.lang.String directoryName,
java.lang.String parentItemIdentifier,
NSFileProviderExtension.Block_createDirectoryWithNameInParentItemIdentifierCompletionHandler completionHandler)
Create a directory.
|
static java.lang.String |
debugDescription_static() |
void |
deleteItemWithIdentifierCompletionHandler(java.lang.String itemIdentifier,
NSFileProviderExtension.Block_deleteItemWithIdentifierCompletionHandler completionHandler)
Delete an item forever.
|
static java.lang.String |
description_static() |
NSURL |
documentStorageURL()
The root URL for provided documents.
|
NSFileProviderDomain |
domain() |
NSFileProviderEnumerator |
enumeratorForContainerItemIdentifierError(java.lang.String containerItemIdentifier,
org.moe.natj.general.ptr.Ptr<NSError> error)
Create an enumerator for an item.
|
NSProgress |
fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler(NSArray<java.lang.String> itemIdentifiers,
CGSize size,
NSFileProviderExtension.Block_fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler_2 perThumbnailCompletionHandler,
NSFileProviderExtension.Block_fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler_3 completionHandler)
The system calls this method to fetch thumbnails.
|
static long |
hash_static() |
void |
importDocumentAtURLToParentItemIdentifierCompletionHandler(NSURL fileURL,
java.lang.String parentItemIdentifier,
NSFileProviderExtension.Block_importDocumentAtURLToParentItemIdentifierCompletionHandler completionHandler)
Import a document.
|
NSFileProviderExtension |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
void |
itemChangedAtURL(NSURL url)
Called at some point after the file has changed; the provider may then trigger
an upload.
|
NSFileProviderItem |
itemForIdentifierError(java.lang.String identifier,
org.moe.natj.general.ptr.Ptr<NSError> error) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static NSFileProviderExtension |
new_objc() |
java.lang.String |
persistentIdentifierForItemAtURL(NSURL url) |
static NSURL |
placeholderURLForURL(NSURL url)
Returns the designated placeholder URL for a given URL.
|
void |
providePlaceholderAtURLCompletionHandler(NSURL url,
NSFileProviderExtension.Block_providePlaceholderAtURLCompletionHandler completionHandler)
This method is called when a placeholder URL should be provided for the item at
the given URL.
|
java.lang.String |
providerIdentifier()
An identifier unique to this provider.
|
void |
renameItemWithIdentifierToNameCompletionHandler(java.lang.String itemIdentifier,
java.lang.String itemName,
NSFileProviderExtension.Block_renameItemWithIdentifierToNameCompletionHandler completionHandler)
Rename a document or a directory.
|
void |
reparentItemWithIdentifierToParentItemWithIdentifierNewNameCompletionHandler(java.lang.String itemIdentifier,
java.lang.String parentItemIdentifier,
java.lang.String newName,
NSFileProviderExtension.Block_reparentItemWithIdentifierToParentItemWithIdentifierNewNameCompletionHandler completionHandler)
Move an item to a new directory.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setFavoriteRankForItemIdentifierCompletionHandler(NSNumber favoriteRank,
java.lang.String itemIdentifier,
NSFileProviderExtension.Block_setFavoriteRankForItemIdentifierCompletionHandler completionHandler)
Mark a directory as favorite (or no longer favorite if favoriteRank is nil.)
|
void |
setLastUsedDateForItemIdentifierCompletionHandler(NSDate lastUsedDate,
java.lang.String itemIdentifier,
NSFileProviderExtension.Block_setLastUsedDateForItemIdentifierCompletionHandler completionHandler)
Mark an item as recently used, or clear its lastUsedDate if nil.
|
void |
setTagDataForItemIdentifierCompletionHandler(NSData tagData,
java.lang.String itemIdentifier,
NSFileProviderExtension.Block_setTagDataForItemIdentifierCompletionHandler completionHandler)
Tag an item, or untag it if tagData is nil.
|
static void |
setVersion_static(long aVersion) |
void |
startProvidingItemAtURLCompletionHandler(NSURL url,
NSFileProviderExtension.Block_startProvidingItemAtURLCompletionHandler completionHandler)
Should ensure that the actual file is in the position returned by
URLForItemWithPersistentIdentifier:, then call the completion handler.
|
void |
stopProvidingItemAtURL(NSURL url)
Called after the last claim to the file has been released.
|
static org.moe.natj.objc.Class |
superclass_static() |
NSArray<?> |
supportedServiceSourcesForItemIdentifierError(java.lang.String itemIdentifier,
org.moe.natj.general.ptr.Ptr<NSError> error) |
void |
trashItemWithIdentifierCompletionHandler(java.lang.String itemIdentifier,
NSFileProviderExtension.Block_trashItemWithIdentifierCompletionHandler completionHandler)
Move an item to the trash.
|
void |
untrashItemWithIdentifierToParentItemIdentifierCompletionHandler(java.lang.String itemIdentifier,
java.lang.String parentItemIdentifier,
NSFileProviderExtension.Block_untrashItemWithIdentifierToParentItemIdentifierCompletionHandler completionHandler)
Move an item out of the trash.
|
NSURL |
URLForItemWithPersistentIdentifier(java.lang.String identifier)
Should return the URL corresponding to a specific identifier.
|
static long |
version_static() |
static boolean |
writePlaceholderAtURLWithMetadataError(NSURL placeholderURL,
NSDictionary<java.lang.String,?> metadata,
org.moe.natj.general.ptr.Ptr<NSError> error)
Writes out a placeholder at the specified URL.
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected NSFileProviderExtension(org.moe.natj.general.Pointer peer)
public NSURL URLForItemWithPersistentIdentifier(java.lang.String identifier)
This is a static mapping; each identifier must always return a path corresponding to the same file. By default, this returns the path relative to the path returned by documentStorageURL.
public static boolean accessInstanceVariablesDirectly()
public static NSFileProviderExtension alloc()
public static NSFileProviderExtension allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public NSURL documentStorageURL()
public static long hash_static()
public NSFileProviderExtension init()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public void itemChangedAtURL(NSURL url)
public NSFileProviderItem itemForIdentifierError(java.lang.String identifier, org.moe.natj.general.ptr.Ptr<NSError> error)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSFileProviderExtension new_objc()
public java.lang.String persistentIdentifierForItemAtURL(NSURL url)
public static NSURL placeholderURLForURL(NSURL url)
public void providePlaceholderAtURLCompletionHandler(NSURL url, NSFileProviderExtension.Block_providePlaceholderAtURLCompletionHandler completionHandler)
The implementation of this method should call +[NSFileProviderManager writePlaceholderAtURL:withMetadata:error:] with the URL returned by +[NSFileProviderManager placeholderURLForURL:], then call the completion handler.
public java.lang.String providerIdentifier()
When modifying the files stored in the directory returned by documentStorageURL, you should pass this identifier to your file coordinator's setPurposeIdentifier: method.
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public void startProvidingItemAtURLCompletionHandler(NSURL url, NSFileProviderExtension.Block_startProvidingItemAtURLCompletionHandler completionHandler)
public void stopProvidingItemAtURL(NSURL url)
Care should be taken that the corresponding placeholder file stays behind after the content file has been deleted.
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public static boolean writePlaceholderAtURLWithMetadataError(NSURL placeholderURL, NSDictionary<java.lang.String,?> metadata, org.moe.natj.general.ptr.Ptr<NSError> error)
Metadata contains NSURLNameKey, NSURLFileSizeKey, NSURLIsPackageKey.
public void createDirectoryWithNameInParentItemIdentifierCompletionHandler(java.lang.String directoryName,
java.lang.String parentItemIdentifier,
NSFileProviderExtension.Block_createDirectoryWithNameInParentItemIdentifierCompletionHandler completionHandler)
This is expected to complete before doing any network.
In the completion block, createdDirectoryItem should have these properties set: - itemIdentifier - parentItemIdentifier (to the value passed in to this method) - filename (to directoryName) - creationDate (to the current date and time) - contentType (to "public.folder" - UTTypeFolder) - childItemCount (to 0) - capabilities
Errors (including collision errors) are handled as documented for the import method above. Directory creation is gated by the capabilities of the destination directory, with NSFileProviderItemCapabilitiesAllowsAddingSubItems.
public void deleteItemWithIdentifierCompletionHandler(java.lang.String itemIdentifier,
NSFileProviderExtension.Block_deleteItemWithIdentifierCompletionHandler completionHandler)
This is called when the user deletes an item that was already in the Trash and the item should no longer appear there after this call. This call should remove the item from the working set.
Delete is gated by the capabilities of the removed item with NSFileProviderItemCapabilitiesAllowsDeleting.
public NSFileProviderDomain domain()
public NSFileProviderEnumerator enumeratorForContainerItemIdentifierError(java.lang.String containerItemIdentifier, org.moe.natj.general.ptr.Ptr<NSError> error)
When the user opens the browse tab of the UIDocumentsBrowserViewController and selects a file provider, this is called with NSFileProviderRootContainerItemIdentifier, and -[NSFileProviderEnumerator enumerateItemsForObserver:startingAtPage:] is immediately called to list the first items available under at the root level of the file provider.
As the user navigates down into directories, new enumerators are created with this method, passing in the itemIdentifier of those directories. Past enumerators are then invalidated.
This method is also called with NSFileProviderWorkingSetContainerItemIdentifier, which is enumerated with -[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:]. That enumeration is special in that it isn't driven by the UIDocumentsBrowserViewController. It happens in the background to sync the working set down to the device.
This is also used to subscribe to live updates for a single document. In that case, -[NSFileProviderEnumerator enumerateChangesToObserver:fromSyncAnchor:] will be called and the enumeration results shouldn't include items other than the very item that the enumeration was started on.
If returning nil, you must set the error out parameter.
public NSProgress fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler(NSArray<java.lang.String> itemIdentifiers, CGSize size, NSFileProviderExtension.Block_fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler_2 perThumbnailCompletionHandler, NSFileProviderExtension.Block_fetchThumbnailsForItemIdentifiersRequestedSizePerThumbnailCompletionHandlerCompletionHandler_3 completionHandler)
The @p perThumbnailCompletionHandler should be called for each thumbnail, and [@p] completionHandler only after all the per thumbnail completion blocks.
In the event of a global error, the implementation is allowed to skip calling the @p perThumbnailCompletionHandler for individual thumbnails. In that case, the @p completionHandler's error parameter would apply to all item identifiers for which @p perThumbnailCompletionHandler had not been called.
If there is no thumbnail for a given item, the @p perThumbnailCompletionHandler should be called with its @p imageData and @p error parameters both set to nil.
If the system decides that an in-flight thumbnail request is not needed anymore, it will call the returned @p NSProgress object's @p -cancel method, at which time the implementation should clean up any held resources.
The system will cache the thumbnail for the item, and the cache will be invalidated when itemVersion.contentVersion changes.
public void importDocumentAtURLToParentItemIdentifierCompletionHandler(NSURL fileURL, java.lang.String parentItemIdentifier, NSFileProviderExtension.Block_importDocumentAtURLToParentItemIdentifierCompletionHandler completionHandler)
The file or package at fileURL should be moved on disk into the file provider's own storage, where it will later be uploaded. The completion block should be executed after the move on disk, but before the upload. Before doing any network, actually.
In the completion block, importedDocumentItem should have these properties set: - itemIdentifier - parentItemIdentifier (to the value passed in to this method) - filename (to fileURL's resource value for key NSURLNameKey) - creationDate (to NSURLCreationDateKey) - contentModificationDate (to NSURLContentModificationDateKey) - contentType (to NSURLContentTypeKey) - documentSize (to NSURLTotalFileSizeKey on a flat file, or to the sum of the files sizes for a package) - capabilities
[fileURL startAccessingSecurityScopedResource] needs to be called prior to accessing this security scoped URL, and stopAccessingSecurityScopedResource needs to be called when done.
Note that itemIdentifier should be set with no network call. It doesn't have to be the final identifier. If the identifier changes after talking to the server then the file provider should send a delete for the temporary, local identifier immediately followed by an add with the final identifier.
A reasonable way of organizing files in the file provider storage is:
This is expected to work offline even if there might be a collision (another
item with the same filename and parentItemIdentifier) only detected when later
syncing up this change to the server. In that case, it is suggested that a
follow up update to the item change its filename to something unique. This
wouldn't be considered an error to import.
If however you can tell right away, with no communication to your server, that
there is a collision then this call should fail with error code
NSFileProviderErrorFilenameCollision generated with this method:
-[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:].
The existing item set in this error will be used to handle the collision, and
ask the user if she or he would like to replace the existing item. This takes
into account the existing item's capabilities (particularly
NSFileProviderItemCapabilitiesAllowsTrashing and AllowsDeleting.)
Collision checks should be case insensitive even if the filesystem or file
provider might allow two coexisting filenames differing only by their case.
Upload errors (such as NSFileProviderErrorInsufficientQuota) should be handled
with a subsequent update to the item, setting its uploadingError property.
Upload errors should not prevent creating or importing a document, because they
can be resolved at a later date (for example, when the user has quota again.)
Other errors will be presented to the user, but are unexpected. If you want to
prevent imports in a given directory, then the directory item's capacities
should exclude NSFileProviderItemCapabilitiesAllowsAddingSubItems.
public void renameItemWithIdentifierToNameCompletionHandler(java.lang.String itemIdentifier,
java.lang.String itemName,
NSFileProviderExtension.Block_renameItemWithIdentifierToNameCompletionHandler completionHandler)
This is expected to complete before doing any network.
itemName is the full file or directory name, complete with its file extension. In the completion block, property renamedItem.filename should change to itemName. Property renamedItem.displayName should also be updated if you chose to overwrite that method.
Errors (including collision errors) are handled as documented for the import method above. Renames are gated by the capabilities of the renamed item, with NSFileProviderItemCapabilitiesAllowsRenaming.
public void reparentItemWithIdentifierToParentItemWithIdentifierNewNameCompletionHandler(java.lang.String itemIdentifier,
java.lang.String parentItemIdentifier,
java.lang.String newName,
NSFileProviderExtension.Block_reparentItemWithIdentifierToParentItemWithIdentifierNewNameCompletionHandler completionHandler)
This is expected to complete before doing any network.
If newName is non null, the moved item should be renamed to newName.
Errors (including collision errors) are handled as documented for the import method above. Moves are gated by the capabilities of both the moved item with NSFileProviderItemCapabilitiesAllowsReparenting, and the destination directory with NSFileProviderItemCapabilitiesAllowsAddingSubItems.
public void setFavoriteRankForItemIdentifierCompletionHandler(NSNumber favoriteRank, java.lang.String itemIdentifier, NSFileProviderExtension.Block_setFavoriteRankForItemIdentifierCompletionHandler completionHandler)
The favorite rank is used to represent the relative order of two favorite directories in the UI. It is a 64 bit unsigned integer. It needs to be synced.
Favorite directories are relevant to the user and should be in the working set even if they haven't been used recently. The documents and directories in the favorite directory however don't all have to be in the working set, and don't all have to be made accessible offline.
The file provider is asked to persist the new favorite rank on disk, then call the completion callback with the updated favorite rank. At a later point, the file provider should sync the new favorite rank to their server.
public void setLastUsedDateForItemIdentifierCompletionHandler(NSDate lastUsedDate, java.lang.String itemIdentifier, NSFileProviderExtension.Block_setLastUsedDateForItemIdentifierCompletionHandler completionHandler)
This last used date is the sort key for the recent lists. It is the primary hint that an item must belong to the working set cached and indexed on the user's device.
The file provider is asked to persist the new last used date on disk, then call the completion callback with the updated last used date. At a later point, the file provider should sync the new last used date to their server.
The error parameter is here for debugging purposes alone; it won't be presented to the user or otherwise handled, but it will be logged.
public void setTagDataForItemIdentifierCompletionHandler(NSData tagData, java.lang.String itemIdentifier, NSFileProviderExtension.Block_setTagDataForItemIdentifierCompletionHandler completionHandler)
The file provider is asked to persist the new tag data on disk, then call the completion callback with the updated tagged data. At a later point, the file provider should sync the new tag data to their server.
Tagged items are relevant to the user and should be in the working set even if they haven't been used recently.
If set, the error will be immediately presented to the user and the item just won't be tagged.
On shared items, tags should sync across the devices of any one participant but shouldn't sync across users.
public NSArray<?> supportedServiceSourcesForItemIdentifierError(java.lang.String itemIdentifier, org.moe.natj.general.ptr.Ptr<NSError> error)
public void trashItemWithIdentifierCompletionHandler(java.lang.String itemIdentifier,
NSFileProviderExtension.Block_trashItemWithIdentifierCompletionHandler completionHandler)
In the completion block, property trashedItem.isTrashed should be set to YES. You should keep track of the original parentItemIdentifier of the item before it was moved to trash, so you can move the item back where it used to be in the untrash method. You could use the trashedItem.parentItemIdentifier property for that.
The trashed item should continue to belong to the working set of documents cached on the device and visible offline to the user. But if it is a directory, then all of its children should be removed from the working set and the file provider extension should send deletion events to make sure that they no longer appear in the recent lists.
It is also suggested that shared documents be unshared when trashed.
Trash is gated by the capabilities of the trashed item with NSFileProviderItemCapabilitiesAllowsTrashing.
public void untrashItemWithIdentifierToParentItemIdentifierCompletionHandler(java.lang.String itemIdentifier,
java.lang.String parentItemIdentifier,
NSFileProviderExtension.Block_untrashItemWithIdentifierToParentItemIdentifierCompletionHandler completionHandler)
If parentItemIdentifier is nil, the file provider should attempt to put the item back where it was when it was moved to the trash; otherwise it should move it to this new parent.
If the item is a directory, then the file provider extension should enumerate the children and send addition events in the working set so that the documents in the now untrashed directory may be reindexed.
Untrash is gated by the capabilities of the destination directory, with NSFileProviderItemCapabilitiesAllowsAddingSubItems.