CFile Class
The CFile class provides file reading and writing operations. Normally, this class is designed for use with binary-mode files but may also be used for text files. Note that the lua I/O library also provides many functions for file I/O (Input and Output).
Construction |
Object = new_file() Object = CFile:new() |
Destruction |
Object:delete() |
This class contains 3 enumerated value for use by the Seek method:
nBegin |
The file offset is moved relative to the beginning of the file. |
nCurrent |
The file offset is moved relative to the current position. |
nEnd |
The file offset is moved relative to the end of the file. |
This function is normally used to create a new CFile object as an alternative to the class-based new method.
Creates a new instance of a CFile object, like CFile:new. |
|
Opens a file in the specified mode and returns a new CFile object for it. This combines the new_file creator and the Open method. |
Creates a new instance of a CFile object, like new_file. |
|
Deletes the instance of the CFile object. |
Closes the file. |
|
Returns the current file position. |
|
Commits data in the operating system buffer to the file. |
|
Returns the name of the file. |
|
Opens the file. Also see File Access Modes. |
|
Writes formatted text to the file. |
|
Reads a value or table of values of specified pixel type from a binary file. |
|
Reads a value or table of values of specified pixel type from a binary file. The values are automatically byte-swapped. |
|
Resets the file position to a given location. |
|
Writes a value or table to a binary file using the specified pixel type. |
|
Writes a value or table to a binary file using the specified pixel type. The values are automatically byte-swapped before being written to the file. |
Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.