Renamed the ResourceFile enumeration in the library target as File and also, implemented its "filePath" and "resourcePath" properties.
This commit is contained in:
@@ -20,17 +20,17 @@ public struct CopyFilesTask {
|
||||
// MARK: Functions
|
||||
|
||||
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
|
||||
for resource in ResourceFile.allCases {
|
||||
for resource in File.allCases {
|
||||
guard let source = bundleService.url(
|
||||
forResource: resource.rawValue,
|
||||
withExtension: nil,
|
||||
subdirectory: "Resources/Files"
|
||||
subdirectory: resource.resourcePath
|
||||
) else {
|
||||
assertionFailure("URL should have been initialized.")
|
||||
return
|
||||
}
|
||||
|
||||
let destination = rootFolder.appendingPath(resource.fileName)
|
||||
let destination = rootFolder.appendingPath(resource.filePath)
|
||||
|
||||
try await fileService.copyFile(from: source, to: destination)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user