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 toFileDataProviding
, 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 asreadwrite
, and always using the (synthesized) setter.Warning
Changing the value of this property without posting the appropriate KVO notifications leads to undefined behavior inDocument
.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSURL *fileURL;
Swift
var fileURL: URL? { get }