Various tweaks following code review

This commit is contained in:
Stefan Ceriu
2023-03-31 16:44:28 +03:00
committed by Stefan Ceriu
parent 5f6edacc1a
commit 8b11727f19
19 changed files with 82 additions and 74 deletions
@@ -32,7 +32,7 @@ extension FileManager {
try createDirectory(at: url, withIntermediateDirectories: withIntermediateDirectories)
}
func copyFileToTemporaryLocation(url: URL) throws -> URL {
func copyFileToTemporaryDirectory(url: URL) throws -> URL {
let newURL = URL.temporaryDirectory.appendingPathComponent(url.lastPathComponent)
try? removeItem(at: newURL)
@@ -41,7 +41,7 @@ extension FileManager {
return newURL
}
func writeDataToTemporaryLocation(data: Data, fileName: String) throws -> URL {
func writeDataToTemporaryDirectory(data: Data, fileName: String) throws -> URL {
let newURL = URL.temporaryDirectory.appendingPathComponent(fileName)
try data.write(to: newURL)