|
|
|
|
|
- Handling errors
- Current position
fSeek (Function) In french: fPositionne Gets and sets current position in an external file. When opening a file, the current position corresponds to: - the first file byte,
- the last file byte if the file is opened in "addition" mode (foAdd constant).
Syntax
<Result> = fSeek(<File used> , <Move> , <Source position>)
<Result>: Integer - Current position after modification,
- -1 if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
<File used>: Integer or DiskFile variable <Move>: Integer Amount of bytes (characters) to offset in the file. To move backwards from the end of the file (fpEnd constant), this number must be negative. <Source position>: Constant Specifies the source position: | | fpBeginning | The source position corresponds to the first file byte (position 0). | fpCurrent | The source position corresponds to the current position. | fpEnd | The source position corresponds to the last file byte. |
Remarks Handling errors fSeek throws an error in the following cases: - the file is not opened,
- the file is locked by another computer or by another application.
Current position To retrieve the current position in the external file, use the following syntax:
CurrentPosition = fSeek(FileID, 0, fpCurrent)
No move is performed in the specified file. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|