Skip to main content

Name

io_wrapper_lseek — Reposition read/write resource offset

Synopsis

#include "io_wrapper.h"

| int **io_wrapper_lseek** ( | io, |   | |   | offset, |   | |   | whence); |   |

io_object * <var class="pdparam">io</var>; off_t <var class="pdparam">offset</var>; int <var class="pdparam">whence</var>;

Description

Reposition read/write resource offset. This function behaves like the system function lseek(2).

Parameters

io

The resource.

offset

The offset relative to whence.

whence

The value, such as SEEK_SET, from where the offset will be calculated.

Return Values

On success, this function returns the offset position in bytes; on failure it returns -1.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?