StubDocument.swift 444 B

12345678910111213141516171819202122
  1. //
  2. // StubDocument.swift
  3. // Todos
  4. //
  5. // Created by Sam Jaffe on 3/1/26.
  6. //
  7. import Foundation
  8. import SwiftUI
  9. import UniformTypeIdentifiers
  10. struct StubDocument : FileDocument {
  11. static var readableContentTypes = [UTType.yaml]
  12. init() {}
  13. init(configuration: ReadConfiguration) throws {}
  14. func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
  15. return FileWrapper(regularFileWithContents: Data())
  16. }
  17. }