FileSeek |
Top Previous Next |
Prototype
FileSeek(intFileHandle, intPosition)
Description
Place inside a file in the position passed as parameter.
Parameters
IntFileHandle: integer numerical value that corresponds at the handle of the file.
IntPosition: integer numerical value that corresponds at the position.
Returned value
None.
Notes
This command cannot be used with text files.
Example
// Open the file FirstFile:=FileOpen('c:\files\file');
// Open another file SecondFile:=FileOpen('c:\files\SecondFile');
// position a locator in the first file FileSeek(FirstFile, 1);
// Read a byte from the first file ByteRead:=FileRead(FirstFile);
// position a locator in the second file FileSeek(SecondFile, 1);
// Write a byte in the second file FileWrite(SecondFile,ByteRead);
// Close the first file FileClose(FirstFile);
// Close the second file FileClose(SecondFile);
|