Write AVIF image generation script
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user