Goto main content

seek

Move the read/write file offset to a specified byte within a file.

SEEK

NAME

seek - Move the read/write file offset to a specified byte within a file.

SYNOPSIS

seek(file_descriptor, string)

seek(file:file_descriptor,where:int,offset:int)

DESCRIPTION

This function is used vove the read/write file offset to a specified byte within a file.

The new position in the file is return.

The following definitions in extenso.sn are used by seek:

// Definition for seek
%define SEEK_SET                    0;   /* Seek from beginning of file.  */
%define SEEK_CUR                    1;   /* Seek from current position.  */
%define SEEK_END                    2;   /* Seek from end of file.  */

EXAMPLES

new_offset = seek(ct, where:SEEK_CUR, offset:-2);

SEE ALSO

{{ include("includes/files.sn") }}

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2015-12-28 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.