Implemented the "copyFile(from: to: )" function for the FileService service in the library target.
This commit is contained in:
@@ -18,8 +18,8 @@ extension FileServiceSpy: FileServicing {
|
||||
get async { .someCurrentFolder }
|
||||
}
|
||||
|
||||
func copyItem(from source: URL, to destination: URL) async throws (FileServiceError) {
|
||||
actions.append(.itemCopied(source, destination))
|
||||
func copyFile(from source: URL, to destination: URL) async throws (FileServiceError) {
|
||||
actions.append(.fileCopied(source, destination))
|
||||
}
|
||||
|
||||
func createFolder(at location: URL) async throws (FileServiceError) {
|
||||
@@ -43,8 +43,8 @@ extension FileServiceSpy: FileServicing {
|
||||
|
||||
extension FileServiceSpy {
|
||||
enum Action: Equatable {
|
||||
case fileCopied(_ source: URL, _ destination: URL)
|
||||
case folderCreated(_ location: URL)
|
||||
case itemCopied(_ source: URL, _ destination: URL)
|
||||
case itemDeleted(_ location: URL)
|
||||
case itemExists(_ location: URL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user