Implemented the "exists(at: )" function for the FileService service in the module target.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user