Documentation ¶
Index ¶
- Variables
- type File
- func (f *File) Close() error
- func (f *File) Flush() error
- func (f *File) IsClosable() bool
- func (f *File) IsClosed() bool
- func (f *File) IsTemp() bool
- func (f *File) Name() string
- func (f *File) Read(n int) (rt.Value, error)
- func (f *File) ReadAll() (rt.Value, error)
- func (f *File) ReadLine(withEnd bool) (rt.Value, error)
- func (f *File) ReadNumber() (rt.Value, error)
- func (f *File) ReleaseResources(d *rt.UserData)
- func (f *File) Seek(offset int64, whence int) (n int64, err error)
- func (f *File) SetWriteBuffer(mode string, size int) error
- func (f *File) WriteString(s string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferedStdFiles bool = true
BufferedStdFiles sets wether std files should be buffered
View Source
var LibLoader = packagelib.Loader{
Load: load,
Name: "io",
}
LibLoader can load the io lib.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
A File wraps an os.File for manipulation by iolib.
func TempFile ¶
TempFile tries to make a temporary file, and if successful schedules the file to be removed when the process dies.
func ValueToFile ¶
ValueToFile turns a lua value to a *File if possible.
func (*File) IsClosable ¶
func (*File) ReadAll ¶
ReadAll attempts to read the whole file and return a lua string containing it.
func (*File) ReadLine ¶
ReadLine reads a line from the file. If withEnd is true, it will include the end of the line in the returned value.
func (*File) ReadNumber ¶
ReadNumber tries to read a number from the file.
func (*File) ReleaseResources ¶
ReleaseResources cleans up the file
func (*File) WriteString ¶
WriteString writes a string to the file.
Click to show internal directories.
Click to hide internal directories.