Implemented the CopyFilesTask task in the library module.
This commit is contained in:
@@ -23,9 +23,6 @@ public struct FileService: FileServicing {
|
||||
// MARK: Functions
|
||||
|
||||
public func copyFile(from source: URL, to destination: URL) async throws (FileServiceError) {
|
||||
guard try await isItemExists(at: source) else {
|
||||
throw FileServiceError.itemNotExists
|
||||
}
|
||||
guard try await !isItemExists(at: destination) else {
|
||||
throw FileServiceError.itemAlreadyExists
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user