next up previous contents index
Next: 4.8.6 commit: Commit all Up: 4.8 oskit_stream: standard interface Previous: 4.8.4 setsize: Set the

4.8.5 copyto: Copy data from this object to another stream object

 

SYNOPSIS

#include <oskit/com/stream.h>

OSKIT_COMDECL oskit_stream_copyto(oskit_stream_t *f, oskit_stream_t *dst, oskit_u64_t size, [out] oskit_u64_t *out_read, [out] oskit_u64_t *out_written);

DESCRIPTION

This method copies size bytes from the current seek pointer in this stream to the current seek pointer in dst.

Both seek pointers are updated by this method. This method is functionally equivalent to performing an oskit_stream_read on the source stream followed by an oskit_stream_write on the destination stream.

PARAMETERS

f
The source stream from which to copy.
dst
The destination stream to which to copy.
size
The number of bytes to copy.
out_read
The actual number of bytes read from the source.
out_written
The actual number of bytes written to the destination.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group