![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2025.
|
Provide an interface for reading from and writing to files on disk. More...
Public Types | |
| enum | OpenModeEnum { ReadOnly = 1 , WriteOnly = 2 , ReadWrite = 3 , Append = 4 , Truncate = 8 } |
| The opening modes. More... | |
Public Member Functions | |
| boolean | AtEnd () |
| Return if the current read and write position is at the end of the file (i.e. there is no more data available for reading on the file). | |
| Close () | |
| Close the file. | |
| boolean | Exists () |
| Check if the file exists. | |
| string | FileName () |
| Get the filename of the SFile. | |
| boolean | IsOpen () |
| Return if the file is open or not. A file is open if it can be read from and/or written to. | |
| boolean | Open (OpenModeEnum openMode) |
| Open the existing file (The file is always open in text mode). | |
| string | ReadAll () |
| Read all available data from the file. | |
| string | ReadLine () |
| Read a line from the file. | |
| boolean | Remove () |
| Remove the file specified by the FileName(). | |
| boolean | Rename (string newName) |
| Rename the file currently specified by FileName() with the given name. | |
| SFile (string name) | |
| Construct a new file object to represent the file with the given name. | |
| string | toString () |
| Get the type of the variable. | |
| boolean | Write (string toWrite) |
| Write the content of a string to the file. | |
Static Public Member Functions | |
| static SFile | New (string name) |
| Construct a new file object to represent the file with the given name. | |
| static boolean | Remove (string fileName) |
| Remove the file specified by the fileName given. | |
Provide an interface for reading from and writing to files on disk.
| enum SFile::OpenModeEnum |
The opening modes.
| SFile::SFile | ( | string | name | ) |
Construct a new file object to represent the file with the given name.
| name | (string) The name of the file. |
| boolean SFile::AtEnd | ( | ) |
Return if the current read and write position is at the end of the file (i.e. there is no more data available for reading on the file).
| SFile::Close | ( | ) |
Close the file.
| boolean SFile::Exists | ( | ) |
Check if the file exists.
| string SFile::FileName | ( | ) |
Get the filename of the SFile.
| boolean SFile::IsOpen | ( | ) |
Return if the file is open or not. A file is open if it can be read from and/or written to.
|
static |
| boolean SFile::Open | ( | OpenModeEnum | openMode | ) |
Open the existing file (The file is always open in text mode).
| openMode | (OpenModeEnum) The opening mode to use.
|
| string SFile::ReadAll | ( | ) |
Read all available data from the file.
| string SFile::ReadLine | ( | ) |
Read a line from the file.
| boolean SFile::Remove | ( | ) |
Remove the file specified by the FileName().
|
static |
Remove the file specified by the fileName given.
| fileName | (string) The name of the file to remove. |
| boolean SFile::Rename | ( | string | newName | ) |
Rename the file currently specified by FileName() with the given name.
| newName | (string) The new name of the file. |
| string SFile::toString | ( | ) |
Get the type of the variable.
| boolean SFile::Write | ( | string | toWrite | ) |
Write the content of a string to the file.
| toWrite | (string) The string to write in the file |