NAME

rewind - sets the current read/write position to the beginning of the file

SYNOPSIS

file.rewind()

DESCRIPTION

The rewind() intrinsic method sets the current read/write position in a file to the beginning-of-file. A successful rewind() will clear the end-of-file indicator and remove any effect of ungetc().

Non-disk-based files (pipes, terminals) may not be rewound.

RETURN VALUE

None

ERRORS

ArgCheck if arguments are specified
TypeCheck if file is not a File
AccessCheck if file has been closed
IoCheck for general I/O subsystem errors

EXAMPLE

    file.rewind(); // Reset to the beginning-of-file

SEE ALSO

fseek
feof
ispipe
ungetc