Last active
July 26, 2020 19:44
-
-
Save acwright/0d4fabb44122e3b8824d924332af53c0 to your computer and use it in GitHub Desktop.
DocExample ReferenceFileDocument protocol methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func snapshot(contentType: UTType) throws -> String { | |
return self.text | |
} | |
func write(snapshot: String, to fileWrapper: inout FileWrapper, contentType: UTType) throws { | |
let data = snapshot.data(using: .utf8)! | |
fileWrapper = FileWrapper(regularFileWithContents: data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment