Reorganize saving, generate feed
This commit is contained in:
@ -13,6 +13,9 @@ import Foundation
|
||||
*/
|
||||
final class Storage {
|
||||
|
||||
static let outputPathBookmarkKey = "outputPathBookmark"
|
||||
static let contentPathBookmarkKey = "contentPathBookmark"
|
||||
|
||||
private(set) var baseFolder: URL
|
||||
|
||||
private let encoder = JSONEncoder()
|
||||
@ -252,7 +255,7 @@ final class Storage {
|
||||
private func deleteFiles(in folder: URL, notIn fileSet: Set<String>) throws {
|
||||
let filesToDelete = try files(in: folder)
|
||||
.filter { !fileSet.contains($0.lastPathComponent) }
|
||||
|
||||
|
||||
for file in filesToDelete {
|
||||
try fm.removeItem(at: file)
|
||||
print("Deleted \(file.path())")
|
||||
|
Reference in New Issue
Block a user