Skip to content

Commit

Permalink
Move ProcessedFilePath to FileManager
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Nov 6, 2024
1 parent 018c44a commit 668ab71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Sources/Zip/Zip+ProcessedFilePath.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

extension Zip {
extension FileManager {
struct ProcessedFilePath {
let filePathURL: URL
let fileName: String?
Expand All @@ -12,12 +12,12 @@ extension Zip {

/// Process zip paths.
///
/// - Parameter paths: Paths as `URL`.
/// - Parameter roots: Paths as `URL`.
///
/// - Returns: Array of ``ProcessedFilePath`` structs.
static func processZipPaths(_ paths: [URL]) -> [ProcessedFilePath] {
static func fileSubPaths(from roots: [URL]) -> [ProcessedFilePath] {
var processedFilePaths = [ProcessedFilePath]()
for pathURL in paths {
for pathURL in roots {
var isDirectory: ObjCBool = false
_ = FileManager.default.fileExists(
atPath: pathURL.nativePath,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Zip/Zip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public class Zip {
compression: ZipCompression = .DefaultCompression,
progress: ((_ progress: Double) -> Void)? = nil
) throws {
let processedPaths = Self.processZipPaths(paths)
let processedPaths = FileManager.fileSubPaths(from: paths)

let chunkSize = 16384

Expand Down

0 comments on commit 668ab71

Please sign in to comment.