Type Method

outputStreamToFileAtPath:append:

Creates and returns an initialized output stream for writing to a specified file.

Declaration

+ (instancetype)outputStreamToFileAtPath:(NSString *)path append:(BOOL)shouldAppend;

Parameters

path

The path to the file the output stream will write to.

shouldAppend

YES if newly written data should be appended to any existing file contents, otherwise NO.

Return Value

An initialized output stream that can write to path.

Discussion

The stream must be opened before it can be used.

See Also

Creating Streams

+ outputStreamToMemory

Creates and returns an initialized output stream that will write stream data to memory.

+ outputStreamToBuffer:capacity:

Creates and returns an initialized output stream that can write to a provided buffer.

+ outputStreamWithURL:append:

Creates and returns an initialized output stream for writing to a specified URL.

- initToMemory

Returns an initialized output stream that will write to memory.

- initToBuffer:capacity:

Returns an initialized output stream that can write to a provided buffer.

- initToFileAtPath:append:

Returns an initialized output stream for writing to a specified file.

- initWithURL:append:

Returns an initialized output stream for writing to a specified URL.