Renamed the ResourceFile enumeration in the library target as File and also, implemented its "filePath" and "resourcePath" properties.

This commit is contained in:
2025-01-18 11:50:26 +01:00
parent 720ad687fb
commit f558465b62
6 changed files with 118 additions and 56 deletions
@@ -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)
}