ObjFW
Public Member Functions | Static Public Member Functions
OFProcess Class Reference

A class for stream-like communication with a newly created process. More...

#import <OFProcess.h>

Inheritance diagram for OFProcess:
OFStream OFObject <OFCopying> <OFObject>

List of all members.

Public Member Functions

(id) - initWithProgram:
 Initializes an already allocated OFProcess with the specified program and invokes the program.
(id) - initWithProgram:arguments:
 Initializes an already allocated OFProcess with the specified program and arguments and invokes the program.
(id) - initWithProgram:programName:arguments:
 Initializes an already allocated OFProcess with the specified program, program name and arguments and invokes the program.
(void) - closeForWriting
 Closes the write direction of the process.

Static Public Member Functions

(id) + processWithProgram:
 Creates a new OFProcess with the specified program and invokes the program.
(id) + processWithProgram:arguments:
 Creates a new OFProcess with the specified program and arguments and invokes the program.
(id) + processWithProgram:programName:arguments:
 Creates a new OFProcess with the specified program, program name and arguments and invokes the program.

Detailed Description

A class for stream-like communication with a newly created process.


Member Function Documentation

- (void) closeForWriting

Closes the write direction of the process.

This method needs to be called for some programs before data can be read, since some programs don't start processing before the write direction is closed.

- (id) initWithProgram: (OFString*)  program

Initializes an already allocated OFProcess with the specified program and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
Returns:
An initialized OFProcess.
- (id) initWithProgram: (OFString*)  program
arguments: (OFArray*)  arguments 

Initializes an already allocated OFProcess with the specified program and arguments and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
argumentsThe arguments to pass to the program, or nil
Returns:
An initialized OFProcess.
- (id) initWithProgram: (OFString*)  program
programName: (OFString*)  programName
arguments: (OFArray*)  arguments 

Initializes an already allocated OFProcess with the specified program, program name and arguments and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
programNameThe program name for the program to invoke (argv[0]). Usually, this is equal to program.
argumentsThe arguments to pass to the program, or nil
Returns:
An initialized OFProcess.
+ (id) processWithProgram: (OFString*)  program

Creates a new OFProcess with the specified program and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
Returns:
A new, autoreleased OFProcess.
+ (id) processWithProgram: (OFString*)  program
arguments: (OFArray*)  arguments 

Creates a new OFProcess with the specified program and arguments and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
argumentsThe arguments to pass to the program, or nil
Returns:
A new, autoreleased OFProcess.
+ (id) processWithProgram: (OFString*)  program
programName: (OFString*)  programName
arguments: (OFArray*)  arguments 

Creates a new OFProcess with the specified program, program name and arguments and invokes the program.

Parameters:
programThe program to execute. If it does not start with a slash, the search path specified in PATH is used.
programNameThe program name for the program to invoke (argv[0]). Usually, this is equal to program.
argumentsThe arguments to pass to the program, or nil
Returns:
A new, autoreleased OFProcess.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Properties