2024-12-15 21:20:12 +01:00

46 lines
1.4 KiB
Swift

import Foundation
final class PathSettings: ObservableObject {
@Published
var outputDirectoryPath: String
@Published
var assetsOutputFolderPath: String
@Published
var pagesOutputFolderPath: String
@Published
var imagesOutputFolderPath: String
@Published
var filesOutputFolderPath: String
@Published
var videosOutputFolderPath: String
@Published
var tagsOutputFolderPath: String
init(file: PathSettingsFile) {
self.assetsOutputFolderPath = file.assetsOutputFolderPath
self.outputDirectoryPath = file.outputDirectoryPath
self.pagesOutputFolderPath = file.pagesOutputFolderPath
self.imagesOutputFolderPath = file.imagesOutputFolderPath
self.filesOutputFolderPath = file.filesOutputFolderPath
self.videosOutputFolderPath = file.videosOutputFolderPath
self.tagsOutputFolderPath = file.tagsOutputFolderPath
}
var file: PathSettingsFile {
.init(outputDirectoryPath: outputDirectoryPath,
assetsOutputFolderPath: assetsOutputFolderPath,
pagesOutputFolderPath: pagesOutputFolderPath,
imagesOutputFolderPath: imagesOutputFolderPath,
filesOutputFolderPath: filesOutputFolderPath,
videosOutputFolderPath: videosOutputFolderPath,
tagsOutputFolderPath: tagsOutputFolderPath)
}
}