Contents

execute(withArguments:completionHandler:)

Execute the unix script with the specified arguments.

Declaration

func execute(withArguments arguments: [String]?, completionHandler handler: NSUserUnixTask.CompletionHandler? = nil)
func execute(withArguments arguments: [String]?) async throws

Parameters

  • arguments:

    An array of NSString objects containing the script arguments. The arguments do not undergo shell expansion, so you do not need to do special quoting, and shell variables are not resolved.

  • handler:

    The completion handler Block that returns the result. See Completionhandler.

Discussion

This method should be invoked no more than once for a given instance of the class.

If the script completed normally, the completion handler’s error parameter will be nil.

See Also

Related Documentation