PSPDFFileDataProviding

Objective-C

@protocol PSPDFFileDataProviding <PSPDFDataProviding>

Swift

protocol FileDataProviding : DataProviding

A more specialized protocol for data providers backed by local files.

  • The local file URL that the data provider reads from.

    This can only be nil when the data provider supplies a progress and that progress is not completed. When implementing a custom class that conforms to FileDataProviding, where the value of this property may change over time — maybe because the file has become available after loading from the network, moved on disk, or deleted — it is your responsibility to post the KVO notifications. The simplest way to achieve this is by re-declaring the property as readwrite, and always using the (synthesized) setter.

    Warning

    Changing the value of this property without posting the appropriate KVO notifications leads to undefined behavior in Document.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSURL *fileURL;

    Swift

    var fileURL: URL? { get }