Single File System: Virtual File System Delphi Library
for Archive / Backup with Transparent Compression and Strong Encryption


Positions the current file pointer in a previously opened file within a single file system.

function FileSeek(Handle: Integer; const Offset: Int64; Origin: Integer): Int64;

Use FileSeek to position the file pointer in a file that was opened with FileOpen or FileCreate. Handle contains the file handle that was returned by FileOpen or FileCreate.

Offset specifies the number of bytes from Origin where the file pointer should be positioned. Origin is a code with three possible values, denoting the beginning of the file, the end of the file, and the current position of the file pointer.

Origin   Action    
0   The file pointer is positioned Offset bytes from the beginning of the file.   
1   The file pointer is positioned Offset bytes from its current position.   
2   The file pointer is positioned Offset bytes from the end of the file   
If FileSeek is successful, it returns the new position of the file pointer; otherwise, it returns -1.

Use of the file handlers such as FileSeek is not encouraged. These are low-level file access routines. For normal file operations use TSFSFileStream instead.

© 2000-2004 AidAim Software LLC Single File System: Single-file Syste