Interface NSFileProviderEnumerationObserver


  • public interface NSFileProviderEnumerationObserver
    API-Since: 11.0
    • Method Detail

      • didEnumerateItems

        void didEnumerateItems​(@NotNull
                               @NotNull NSArray<?> updatedItems)
      • finishEnumeratingUpToPage

        void finishEnumeratingUpToPage​(@Nullable
                                       @Nullable NSData nextPage)
        Call this method after enumerating a full page of items. If you set a non-nil nextPage, -[NSFileProviderEnumerator enumerateItemsToObserver:startingAtPage:] might be called with nextPage to enumerate more items. This is typically driven by the user scrolling a UIDocumentBrowserViewController presenting a directory containing more child items that would fit in the view. Page data is limited to 500 bytes. Setting a larger nextPage interrupts the enumeration.
      • finishEnumeratingWithError

        void finishEnumeratingWithError​(@NotNull
                                        @NotNull NSError error)
      • suggestedPageSize

        default long suggestedPageSize()
        Size of the page suggested by the system for better performance. The system will set that property to the value it considers is best suited for the current enumeration. The system can enumerate a container in various cases (container presenter in the UI, file opened in an application, materialization of the folder by the system, ...). Each case has its own performance profile. By taking into account the suggested size, the enumeration will guarantee the best user experience possible. The system enforces a maximum of 100 times the suggested size. API-Since: 16.0