Availability: |
| |||
Property/method value type: | Boolean primitive | |||
JavaScript syntax: | NES | myFile.setPosition(aPosition) | ||
NES | myFile.setPosition(aPosition, aControl) | |||
Argument list: | aControl | A means of indicating what kind of offset to use | ||
aPosition | A 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() |
Prev | Home | Next |
File.readln() | Up | File.stringToByte() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |