The GDBaseNSTaskOperation is a base operation class that executes an NSTask, and can read and store the stdout, and stderr for use after the task executes. More...
#import <GDBaseNSTaskOperation.h>
Public Member Functions | |
| (void) | - initializeTask |
| Creates the NSTask and stores it into the task property. | |
| (void) | - main |
| Thread entry point. | |
| (void) | - readSTDERR |
| Reads the standard error from the NSTask. | |
| (void) | - readSTDOUT |
| Reads the standard out from the NSTask. | |
| (void) | - writeFileForInput |
| Writes the file contents to the desired file. | |
| (void) | - prepareTask |
| A hook you should override to prepate the task instance with it's launch path, arguments, etc. | |
| (void) | - updateArguments |
| A helper to update the arguments. | |
| (void) | - validateTerminationStatus |
| A hook you can use to do something with the taskTerminationStatus variable. | |
| (void) | - taskComplete |
| A hook you should override to do something when this task is complete. | |
Protected Attributes | |
| BOOL | writesFileForTaskInput |
| Whether or not a file should be written before the task (not operation) executes. | |
| BOOL | readsSTOUT |
| Whether or not this task should read standard out. | |
| BOOL | readsSTERR |
| Whether or not this task should read standard error. | |
| int | taskTerminationStatus |
| The task's termination status. | |
| NSString * | writeFileContents |
| The file contents to write if writesFileForTaskInput is needed. | |
| NSString * | filePathToWriteTo |
| The filepath to write to if writesFileForTaskInput is needed. | |
| NSStringEncoding | stringEncoding |
| The file content encoding. | |
| NSString * | stout |
| UTF8 String container for the standard out contents. | |
| NSString * | sterr |
| UTF8 String container for the standard error contents. | |
| NSMutableArray * | args |
| Task arguments. | |
| NSTask * | task |
| The NSTask instance used to execute this task. | |
The GDBaseNSTaskOperation is a base operation class that executes an NSTask, and can read and store the stdout, and stderr for use after the task executes.
| - (void) taskComplete |
A hook you should override to do something when this task is complete.
This method is still executing as part of the operation but after this method finishes the thread will exit.
| - (void) updateArguments |