Contents

writeFrom:startingAt:length:error:

Synchronously writes data from from a buffer to the resource and executes a block afterwards.

Declaration

- (size_t) writeFrom:(void *) buffer startingAt:(off_t) offset length:(size_t) length error:(NSError **) error;

Parameters

  • buffer:

    A buffer to provide the data.

  • offset:

    The offset into the resource from which to start writing.

  • length:

    A maximum number of bytes to write. The completion handler receives a parameter with the actual number of bytes write.

  • error:

    On return, any error encountered while writing data, or nil if no error occurred.

Return Value

The actual number of bytes written.

Discussion

This is a synchronous version of writeFrom:startingAt:length:completionHandler:.

See Also

Reading and writing data