51 lines
1.5 KiB
Swift
51 lines
1.5 KiB
Swift
import Foundation
|
|
|
|
final class PathSettings: ObservableObject {
|
|
|
|
@Published
|
|
var contentDirectoryPath: String
|
|
|
|
@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.contentDirectoryPath = file.contentDirectoryPath
|
|
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(contentDirectoryPath: contentDirectoryPath,
|
|
outputDirectoryPath: outputDirectoryPath,
|
|
assetsOutputFolderPath: assetsOutputFolderPath,
|
|
pagesOutputFolderPath: pagesOutputFolderPath,
|
|
imagesOutputFolderPath: imagesOutputFolderPath,
|
|
filesOutputFolderPath: filesOutputFolderPath,
|
|
videosOutputFolderPath: videosOutputFolderPath,
|
|
tagsOutputFolderPath: tagsOutputFolderPath)
|
|
}
|
|
}
|