Write AVIF image generation script

This commit is contained in:
Christoph Hagen
2025-01-06 10:08:50 +01:00
parent 301dbad0a5
commit 6c1b473ab8
5 changed files with 27 additions and 8 deletions

View File

@ -280,9 +280,9 @@ final class Storage: ObservableObject {
}
@discardableResult
func deleteInOutputFolder(path: String) -> Bool {
func deleteInOutputFolder(_ relativePath: String) -> Bool {
guard let outputScope else { return false }
return outputScope.deleteFile(at: path)
return outputScope.deleteFile(at: relativePath)
}
/**
@ -400,11 +400,18 @@ final class Storage: ObservableObject {
// MARK: Output files
/**
Write the content of a file to a relative path of the output folder.
*/
@discardableResult
func write(_ content: String, to relativeOutputPath: String) -> Bool {
guard let outputScope else { return false }
return outputScope.write(content, to: relativeOutputPath)
}
/**
Write the data of a file to a relative path of the output folder.
*/
func write(_ data: Data, to relativeOutputPath: String) -> Bool {
guard let outputScope else { return false }
return outputScope.write(data, to: relativeOutputPath)