FileHandle class
Base class for file handles used by the io implementation.
Contents
- Reference
Currently all files opened by io.open use CFileHandle.
The following methods have to be provided by a derived class:
is_open- have the same behaviour described in https:/
/ www.lua.org/ manual/ 5.3/ manual.html#6.8 closeflush
- arguments will be parsed by the base class but you have to implement the behaviour
seek_implsetvbuf_impl
- These methods are used by
readand correspond to the format arguments. Note these may be called multiple times for one read if there are multiple format arguments.read_allread_numread_lineread_line_with_newlineread_count
- these method will be used by
writewrite_string
Public functions
- auto seek_impl(SeekWhence whence, long offset) -> long -> auto pure virtual
- auto setvbuf_impl(SetvbufMode mode, size_t size) -> bool -> auto pure virtual
Function documentation
auto minilua:: io:: FileHandle:: seek_impl(SeekWhence whence,
long offset) -> long pure virtual
Returns the current position after the seek.
auto minilua:: io:: FileHandle:: setvbuf_impl(SetvbufMode mode,
size_t size) -> bool pure virtual
Returns true on success.