|
|
@@ -9,7 +9,7 @@ import Foundation
|
|
|
import SwiftUI
|
|
|
import UniformTypeIdentifiers
|
|
|
|
|
|
-struct StubDocument : FileDocument {
|
|
|
+struct StubYamlDocument : FileDocument {
|
|
|
static var readableContentTypes = [UTType.yaml]
|
|
|
|
|
|
init() {}
|
|
|
@@ -20,3 +20,15 @@ struct StubDocument : FileDocument {
|
|
|
return FileWrapper(regularFileWithContents: Data())
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+struct StubJsonDocument : FileDocument {
|
|
|
+ static var readableContentTypes = [UTType.json]
|
|
|
+
|
|
|
+ init() {}
|
|
|
+
|
|
|
+ init(configuration: ReadConfiguration) throws {}
|
|
|
+
|
|
|
+ func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
|
|
|
+ return FileWrapper(regularFileWithContents: Data())
|
|
|
+ }
|
|
|
+}
|