Bfile SeekFile OS

From WikiPrizm
Revision as of 13:41, 26 August 2012 by Ahelper (talk | contribs) (Added resize warning and tip on seeking like fseek(SEEK_CUR, ...))
Jump to navigationJump to search


Synopsis

Header: fxcg/file.h
Syscall index: 0x1DA9
Function signature: int Bfile_SeekFile_OS( int handle, int pos );

Changes the position in the file handle, similar to fseek.

Parameters

  • handle: File handle as returned by Bfile_OpenFile_OS.
  • pos: Position (absolute, not relative) to seek to.

Returns

Returns the new position in the file handle.

Comments

This function seeks to an absolute location in the file pointer. To seek backwards, use Bfile_GetFileSize_OS and add the offset to that.

WARNING: This function resizes the file if pos > Bfile_GetFileSize_OS. The file cannot shrink, only expand.