Enumeration
Shell
public enum Shell
Nested Type Aliases
Result
public typealias Result = (status: Int32, output: String?, errorOuput: String?)
ResultStream
public typealias ResultStream = (output: String?, errorOuput: String?)
TerminationStatus
public typealias TerminationStatus = Int32
Methods
execute(launchPath:currentDirectoryURL:arguments:stream:)
@available(macOS 10.13, *)
@available(*, deprecated, message: "use execute with 'executableURL'")
@discardableResult
public static func execute(
launchPath: String,
currentDirectoryURL: URL? = nil,
arguments: [String],
stream result: @escaping (Shell.ResultStream) -> Void
) -> Shell.TerminationStatus
execute(launchPath:currentDirectoryURL:arguments:)
@available(macOS 10.13, *)
@discardableResult
@available(*, deprecated, message: "use execute with 'executableURL'")
public static func execute(
launchPath: String,
currentDirectoryURL: URL? = nil,
arguments: [String]
) -> Shell.Result
execute(executableURL:currentDirectoryURL:arguments:)
@available(macOS 10.13, *)
@discardableResult
public static func execute(
executableURL: URL? = URL(fileURLWithPath: "/bin/zsh"),
currentDirectoryURL: URL? = nil,
arguments: [String]
) -> Shell.Result