mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adds startAccessingSecurityScopedResource and stopAccessingSecurityScopedResource to `.fileImporter`s.
36 lines
878 B
Swift
36 lines
878 B
Swift
//
|
|
// NNWThemeDocument.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Stuart Breckenridge on 20/12/2022.
|
|
// Copyright © 2022 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import UniformTypeIdentifiers
|
|
|
|
public struct NNWThemeDocument: FileDocument {
|
|
|
|
public static var readableContentTypes: [UTType] {
|
|
UTType.types(tag: "nnwtheme", tagClass: .filenameExtension, conformingTo: nil)
|
|
}
|
|
|
|
public static var writableContentTypes: [UTType] {
|
|
UTType.types(tag: "nnwtheme", tagClass: .filenameExtension, conformingTo: nil)
|
|
}
|
|
|
|
public init(configuration: ReadConfiguration) throws {
|
|
guard let _ = configuration.file.regularFileContents else {
|
|
throw CocoaError(.fileReadCorruptFile)
|
|
}
|
|
return
|
|
}
|
|
|
|
public func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
|
|
let wrapper = try FileWrapper(url: URL(string: "")!)
|
|
return wrapper
|
|
}
|
|
|
|
}
|
|
|