Allow text file editing

This commit is contained in:
Christoph Hagen
2025-01-14 20:18:26 +01:00
parent 4131b483e6
commit c1a3d22002
5 changed files with 60 additions and 14 deletions

View File

@ -98,6 +98,10 @@ final class FileResource: Item, LocalizedItem {
content.storage.fileContent(for: id) ?? ""
}
func save(textContent: String) -> Bool {
content.storage.save(fileContent: textContent, for: id)
}
func dataContent() -> Foundation.Data? {
content.storage.fileData(for: id)
}