External files, improve page generation
This commit is contained in:
@ -379,6 +379,18 @@ final class Storage {
|
||||
return try readExistingFile(at: path)
|
||||
}
|
||||
|
||||
// MARK: External file list
|
||||
|
||||
private let externalFileListName = "external-files.json"
|
||||
|
||||
func loadExternalFileList() throws -> [String] {
|
||||
try read(at: externalFileListName, defaultValue: [])
|
||||
}
|
||||
|
||||
func save(externalFileList: [String]) throws {
|
||||
try writeIfChanged(externalFileList.sorted(), to: externalFileListName)
|
||||
}
|
||||
|
||||
// MARK: Website data
|
||||
|
||||
private let settingsDataFileName: String = "settings.json"
|
||||
|
Reference in New Issue
Block a user