![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
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). More... | |
Close () | |
Close the file. More... | |
boolean | Exists () |
Check if the file exists. More... | |
string | FileName () |
Get the filename of the SFile. More... | |
boolean | IsOpen () |
Return if the file is open or not. A file is open if it can be read from and/or written to. More... | |
boolean | Open (OpenModeEnum openMode) |
Open the existing file (The file is always open in text mode). More... | |
string | ReadAll () |
Read all available data from the file. More... | |
string | ReadLine () |
Read a line from the file. More... | |
boolean | Remove () |
Remove the file specified by the FileName(). More... | |
boolean | Rename (string newName) |
Rename the file currently specified by FileName() with the given name. More... | |
SFile (string name) | |
Construct a new file object to represent the file with the given name. More... | |
string | toString () |
Get the type of the variable. More... | |
boolean | Write (string toWrite) |
Write the content of a string to the file. More... | |
Static Public Member Functions | |
static SFile | New (string name) |
Construct a new file object to represent the file with the given name. More... | |
static boolean | Remove (string fileName) |
Remove the file specified by the fileName given. More... | |
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 |