chore: move files around

This commit is contained in:
relikd
2025-12-01 01:03:02 +01:00
parent 38c861442c
commit abdee3b780
29 changed files with 48 additions and 16 deletions

17
src/Common/URL+File.swift Normal file
View File

@@ -0,0 +1,17 @@
import Foundation
extension URL {
/// Folder where user can mofifications to html template
static let UserModDir: URL? =
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
/// Returns `true` if file or folder exists.
@inlinable func exists() -> Bool {
FileManager.default.fileExists(atPath: self.path)
}
/// Returns URL by deleting last path component
@inlinable func parentDir() -> URL {
self.deletingLastPathComponent()
}
}