13 lines
338 B
Swift
13 lines
338 B
Swift
import Foundation
|
|
|
|
enum RsyncLocator {
|
|
static func locate() -> String {
|
|
let candidates = [
|
|
"/opt/homebrew/bin/rsync",
|
|
"/usr/local/bin/rsync",
|
|
"/usr/bin/rsync"
|
|
]
|
|
return candidates.first(where: { FileManager.default.isExecutableFile(atPath: $0) }) ?? "/usr/bin/rsync"
|
|
}
|
|
}
|