Instance Property

arguments

Sets the command arguments that should be used to launch the executable.

Declaration

var arguments: [String]? { get set }

Parameters

arguments

An array of NSString objects that supplies the arguments to the task. If arguments is nil, an NSInvalidArgumentException is raised.

Discussion

The NSTask object converts both path and the strings in arguments to appropriate C-style strings (using fileSystemRepresentation) before passing them to the task via argv[] . The strings in arguments do not undergo shell expansion, so you do not need to do special quoting, and shell variables, such as $PWD, are not resolved.

See Also

Returning Task Information

var currentDirectoryPath: String

Sets the current directory for the receiver.

Deprecated
var environment: [String : String]?

Sets the environment for the receiver.

var launchPath: String?

Sets the receiver’s executable.

Deprecated
var processIdentifier: Int32

Returns the receiver’s process identifier.

var standardError: Any?

Sets the standard error for the receiver.

var standardInput: Any?

Sets the standard input for the receiver.

var standardOutput: Any?

Sets the standard output for the receiver.