next up previous contents index
Next: 5.2 oskit_asyncio: Asynchronous I/O Up: 5.1 oskit_absio: Absolute I/O Previous: 5.1.3 getsize: Get the

5.1.4 setsize: Set the size of this object

 

SYNOPSIS

#include <oskit/io/absio.h>

OSKIT_COMDECL oskit_absio_setsize(oskit_absio_t *f, oskit_off_t new_size);

DESCRIPTION

This method sets the size of this object to new_size bytes. If new_size is larger than the former size of this object, then the contents of the object between its former end and its new end are undefined.

Note that some absolute I/O objects may be fixed-size, such as objects representing preallocated memory buffers; in such cases, this method will always return OSKIT_E_NOTIMPL.

PARAMETERS

f
The object whose size is to be changed.
new_size
The new size in bytes for this object.

RETURNS

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



University of Utah Flux Research Group