File.setPosition() (Method)

Sometimes you may need to reposition the file pointer. This method allows you to position it at exactly the right place.

Availability:

JavaScript - 1.1
Netscape Enterprise Server - 2.0
Property/method value type:Boolean primitive
JavaScript syntax:NESmyFile.setPosition(aPosition)
NESmyFile.setPosition(aPosition, aControl)
Argument list:aControlA means of indicating what kind of offset to use
aPositionA valid position within the file

File positioning mechanisms are a fundamental part of building indexed record oriented files and managing fixed length records and fields in a sequential and variable length file structure.

The position control takes an integer value that selects a reference technique for setting the new position value.

A position control value of 0 (zero) indicates the new position should be measured from the start of the file.

A position control value of 1 adds the offset to the current position. This should allow forwards or backwards movement relative to the current position.

A position control value of 2 is measured relative to the end of the file.

See also:File.getLength(), File.getPosition()

insert figure 0084