- FileSelectDialog
- FileFindFirst
- FileFindNext
- FileFindClose
- FileIsExist
- FileOpen
- FileClose
- FileCopy
- FileDelete
- FileMove
- FileFlush
- FileGetInteger
- FileIsEnding
- FileIsLineEnding
- FileRead
- FileReadArray
- FileReadBool
- FileReadDatetime
- FileReadDouble
- FileReadFloat
- FileReadInteger
- FileReadLong
- FileReadNumber
- FileReadString
- FileReadStruct
- FileReadComplexDouble
- FileReadComplexFloat
- FileSeek
- FileSize
- FileTell
- FileWrite
- FileWriteArray
- FileWriteComplexDouble
- FileWriteComplexFloat
- FileWriteDouble
- FileWriteFloat
- FileWriteInteger
- FileWriteLong
- FileWriteString
- FileWriteStruct
- FileLoad
- FileSave
- FolderCreate
- FolderDelete
- FolderClean
FileSeek
The function moves the position of the file pointer by a specified number of bytes relative to the specified position.
bool FileSeek(
|
Parameters
file_handle
[in] File descriptor returned by FileOpen().
offset
[in] The shift in bytes (may take a negative value).
origin
[in] The starting point for the displacement. Can be one of values of ENUM_FILE_POSITION.
Return Value
If successful the function returns true, otherwise false. To obtain information about the error call the GetLastError() function.
Note
If the execution of the FileSeek() function results in a negative shift (going beyond the "level boundary" of the file), the file pointer will be set to the file beginning.
If a position is set beyond the "right boundary" of the file (larger than the file size), the next writing to the file will be performed not from the end of the file, but from the position set. In this case indefinite values will be written for the previous file end and the position set.
Example:
//+------------------------------------------------------------------+
|