LuaSTG-x Core API
plus::FileStream Class Reference

Public Member Functions

function Close ()
 关闭文件流 More...
 
function Flush ()
 立即刷新缓冲区 More...
 
function GetPosition ()
 获取当前读写位置 More...
 
function GetSize ()
 获取文件大小 More...
 
function init (local path, local mode)
 初始化文件流 More...
 
function ReadByte ()
 读取一个字节 More...
 
function ReadBytes (local count)
 读取若干个字节 More...
 
function Seek (local offset, local base)
 跳转到位置 More...
 
function WriteByte (local b)
 写入一个字节 More...
 
function WriteBytes (local data)
 写入字节数组 More...
 

Member Function Documentation

◆ Close()

function Close ( )

关闭文件流

◆ Flush()

function Flush ( )

立即刷新缓冲区

◆ GetPosition()

function GetPosition ( )

获取当前读写位置

Returns
number 读写位置

◆ GetSize()

function GetSize ( )

获取文件大小

Returns
number 文件大小(字节)

◆ init()

function init ( local  path,
local  mode 
)

初始化文件流

Parameters
pathstring 文件路径
modestring 打开模式

◆ ReadByte()

function ReadByte ( )

读取一个字节

Returns
number 若为文件尾则为nil,否则以number返回所读字节

◆ ReadBytes()

function ReadBytes ( local  count)

读取若干个字节

Parameters
countnumber 字节数

◆ Seek()

function Seek ( local  offset,
local  base 
)

跳转到位置

Parameters
offsetnumber 新的位置
basenumber 基准

◆ WriteByte()

function WriteByte ( local  b)

写入一个字节

Parameters
bnumber 要写入的字节

◆ WriteBytes()

function WriteBytes ( local  data)

写入字节数组

Parameters
datastring 要写入的字节

The documentation for this class was generated from the following file: