[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Set the current file position on a file handle.
Source position: filutilh.inc line 163
function FileSeek( |
Handle: THandle; |
FOffset: LongInt; |
Origin: LongInt |
):LongInt; |
Handle: THandle; |
FOffset: Int64; |
Origin: LongInt |
):Int64; |
FileSeek sets the file pointer on position Offset, starting from Origin. Origin can be one of the following values:
If successfull, the function returns the new file position, relative to the beginning of the file.
Remark: | The abovementioned constants do not exist in Delphi. |
On error, -1 is returned.
|
Close a file handle. |
|
|
Write data from a buffer to a given filehandle. |
|
|
Create a new file and return a handle to it. |
|
|
Open an existing file and return a filehandle |
|
|
Read data from a filehandle in a buffer. |
|
|
Truncate an open file to a given size. |
Program Example42; { This program demonstrates the FileSetAttr function } Uses sysutils; Begin If FileSetAttr ('ex40.pp',faReadOnly or faHidden)=0 then Writeln ('Successfully made file hidden and read-only.') else Writeln ('Coulnd''t make file hidden and read-only.'); End.