PSPDFLibraryFileSystemDataSourceDocumentProvider

Objective-C

@protocol PSPDFLibraryFileSystemDataSourceDocumentProvider <NSObject>

Swift

protocol LibraryFileSystemDataSourceDocumentProvider : NSObjectProtocol

This protocol defines a method to override the document that the LibraryFileSystemDataSource provides to the PDFLibrary.

  • Returns a document for the specified data source to use for the given UID and path.

    Declaration

    Objective-C

    - (nullable PSPDFDocument *)
             dataSource:(nonnull PSPDFLibraryFileSystemDataSource *)dataSource
        documentWithUID:(nullable NSString *)UID
                  atURL:(nonnull NSURL *)fileURL;

    Swift

    func dataSource(_ dataSource: LibraryFileSystemDataSource, documentWithUID UID: String?, at fileURL: URL) -> PSPDFDocument?

    Parameters

    dataSource

    The data source requesting the document.

    UID

    The UID of the document requested. This can be nil. If not, the returned document’s UID must match this argument.

    fileURL

    The URL of the document.

    Return Value

    The document for the requested UID and path. Return nil to ignore this document.