diff --git a/Library/Sources/Internal/Controllers/ArchiveController.swift b/Library/Sources/Internal/Controllers/ArchiveController.swift index b16e0ae..a8003df 100644 --- a/Library/Sources/Internal/Controllers/ArchiveController.swift +++ b/Library/Sources/Internal/Controllers/ArchiveController.swift @@ -5,20 +5,20 @@ struct ArchiveController { // MARK: Properties + private let archivesPath: String private let fileService: any FileServicing - private let folderArchives: String // MARK: Initialisers /// Initialises this controller. /// - Parameters: - /// - folderArchives: A folder in the file system where the *DocC* archive contained are located. + /// - archivesPath: A path in the local file system where the *DocC* archive contained are located. /// - fileService: A service that interfaces with the local file system. init( - _ folderArchives: String, + _ archivesPath: String, fileService: any FileServicing = FileService() ) { - self.folderArchives = folderArchives + self.archivesPath = archivesPath self.fileService = fileService } @@ -44,7 +44,7 @@ private extension ArchiveController { ) async throws (HTTPError) -> ArchiveList { do { let nameArchives = try await fileService - .listItems(in: folderArchives) + .listItems(in: archivesPath) .filter { $0.hasSuffix(.suffixArchive) } .map { $0.dropLast(String.suffixArchive.count) } .map(String.init)