Implemented the "exists(at: )" function for the FileService service in the module target.

This commit is contained in:
2025-01-11 03:24:22 +01:00
parent 739fe0c8de
commit 7d0ad3461a
3 changed files with 98 additions and 15 deletions
+16 -2
View File
@@ -1,9 +1,23 @@
import Foundation
protocol FileServicing {
public protocol FileServicing {
// MARK: Properties
// MARK: Computed
var currentFolder: URL { get async }
// MARK: Functions
func exists(at url: URL) async throws (FileServiceError) -> Bool
}
// MARK: - Errors
public enum FileServiceError: Error, Equatable {
case folderNotCreated
case folderNotDeleted
case urlAlreadyExists
case urlNotExists
case urlNotFileURL
}