File Object Functions

From Danmakufu Wiki
Jump to: navigation, search

ObjFile_Create

Returns: object ID (real)

Creates a file object. Object types are:

  • OBJ_FILE_TEXT: a text file
  • OBJ_FILE_BINARY: a binary file

ObjFile_Open

Arguments:
 1) object ID (real)
 2) file path (char)

Opens a file for reading with the specified path and binds the specified file object to the opened file.

ObjFile_OpenNW

Arguments:
 1) object ID (real)
 2) file path (char)

Opens a file for both reading and writing with the specified path and binds the specified file object to the opened file.

ObjFile_Store

Arguments:
 1) object ID (real)

Saves a file previously opened with ObjFile_OpenNW. Must be called once after writing the data.

ObjFile_GetSize

Arguments:
 1) object ID (real)