Contents

init(_:makeSnapshot:)

Creates a reader that converts a FileWrapper into a snapshot.

Declaration

init(_ configuration: sending FileWrapperDocumentReader<Snapshot>.ReadConfiguration, makeSnapshot: @escaping (FileWrapper) async throws -> sending  Snapshot)

Parameters

  • configuration:

    The read configuration passed to Reader(configuration:).

  • makeSnapshot:

    A closure that deserializes the FileWrapper into a snapshot. For flat files, read regularFileContents. For packages, navigate fileWrappers to find children. Throw an error if the data is malformed.

See Also

Creating a reader