NAME

ftell - returns the current read or write position in a File

SYNOPSIS

file.ftell()

DESCRIPTION

The ftell() intrinsic method returns the current byte offset from the beginning of the file. This position represents where the next read or write operation will occur.

RETURN VALUE

An Int or Long representing the current byte offset. Returns -1 if the file is an interactive stream or a pipe.

ERRORS

ArgCheck if an incorrect number of arguments are specified
TypeCheck if file is not a File
AccessCheck if file has been closed

EXAMPLE

    f = new File("test.bin", "wb")
    f.write("Hello")
    f.ftell()
5

SEE ALSO

fseek
rewind
feof
ispipe