Skip to content

Commit 850ba69

Browse files
committed
FileManager: Rename helper function
1 parent 5ce091e commit 850ba69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/FileManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ open class FileManager : NSObject {
530530
}
531531
}
532532

533-
private func _processItem(atPath srcPath: String, toPath dstPath: String, _ body: (String, String, FileAttributeType) throws -> ()) throws {
533+
private func _copyOrLinkDirectoryHelper(atPath srcPath: String, toPath dstPath: String, _ body: (String, String, FileAttributeType) throws -> ()) throws {
534534
guard
535535
let attrs = try? attributesOfItem(atPath: srcPath),
536536
let fileType = attrs[.type] as? FileAttributeType
@@ -562,7 +562,7 @@ open class FileManager : NSObject {
562562
}
563563

564564
open func copyItem(atPath srcPath: String, toPath dstPath: String) throws {
565-
try _processItem(atPath: srcPath, toPath: dstPath) { (srcPath, dstPath, fileType) in
565+
try _copyOrLinkDirectoryHelper(atPath: srcPath, toPath: dstPath) { (srcPath, dstPath, fileType) in
566566
if fileType == .typeSymbolicLink {
567567
try _copySymlink(atPath: srcPath, toPath: dstPath)
568568
} else if fileType == .typeRegular {
@@ -588,7 +588,7 @@ open class FileManager : NSObject {
588588
}
589589

590590
open func linkItem(atPath srcPath: String, toPath dstPath: String) throws {
591-
try _processItem(atPath: srcPath, toPath: dstPath) { (srcPath, dstPath, fileType) in
591+
try _copyOrLinkDirectoryHelper(atPath: srcPath, toPath: dstPath) { (srcPath, dstPath, fileType) in
592592
if fileType == .typeSymbolicLink {
593593
try _copySymlink(atPath: srcPath, toPath: dstPath)
594594
} else if fileType == .typeRegular {

0 commit comments

Comments
 (0)