I have this example of using NSTask in Objective-C
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/bin/bash"];
[task setArguments:@[ @"-c", @"cp /Directory/file /users/user_name/Desktop" ]];
[task launch];
I want to know if the [task setArguments:] returns a state of success or failure for executing that command, and save the state to check afterwards. How can I get that result?
NSFileManager? (It's got-copyItemAtPath:toPath:error:) - Itai Ferber