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
FileWrapperinto a snapshot. For flat files, readregularFileContents. For packages, navigatefileWrappersto find children. Throw an error if the data is malformed.