The Sfile class provides an interface for reading from and writing to files. More...
Public Types | |
enum | OpenModeEnum { ReadOnly , WriteOnly , ReadWrite , Append , Truncate } |
Public Slots | |
Boolean | AtEnd () |
Returns true 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); otherwise returns false. More... | |
Close () | |
To close the file. More... | |
Boolean | Exists () |
To check if the file exists. More... | |
String | FileName () |
Return the name set by the SFile constructor. More... | |
Boolean | IsOpen () |
Returns true if the file is open; otherwise returns false. A file is open if it can be read from and/or written to. More... | |
static SFile | New (String name) |
Constructs a new file object to represent the file with the given name. More... | |
Boolean | Open (OpenModeEnum OpenMode) |
Opens the existing file (The file is always open in text mode). Returns true if successful; otherwise returns false. More... | |
String | ReadAll () |
Reads all available data from the file, and returns it as a string. More... | |
String | ReadLine () |
Reads a line from the file. More... | |
Boolean | Remove () |
Removes the file specified by the FileName(). Returns true if successful; otherwise returns false. More... | |
static Boolean | Remove (String fileName) |
Removes the file specified by the fileName given. Returns true if successful; otherwise returns false. More... | |
Boolean | Rename (String NewName) |
Renames the file currently specified by FileName() to NewName. Returns true if successful; otherwise returns false. More... | |
String | toString () |
Get the type of the variable. More... | |
static String | toString () |
Get the type of the variable. More... | |
Boolean | Write (String ToWrite) |
Writes the content of string to the file. Returns true if successful; otherwise returns false if an error occurred. More... | |
Public Slots inherited from SObject | |
Clear () | |
To deallocate memory of the object. More... | |
String | toString () |
Get the type of the variable. More... | |
The Sfile class provides an interface for reading from and writing to files.
enum SFile::OpenModeEnum |
|
slot |
Returns true 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); otherwise returns false.
|
slot |
To close the file.
|
slot |
To check if the file exists.
|
slot |
Return the name set by the SFile constructor.
|
slot |
Returns true if the file is open; otherwise returns false. A file is open if it can be read from and/or written to.
|
staticslot |
Constructs a new file object to represent the file with the given name.
|
slot |
Opens the existing file (The file is always open in text mode). Returns true if successful; otherwise returns false.
|
slot |
Reads all available data from the file, and returns it as a string.
|
slot |
Reads a line from the file.
|
slot |
Removes the file specified by the FileName(). Returns true if successful; otherwise returns false.
|
staticslot |
Removes the file specified by the fileName given. Returns true if successful; otherwise returns false.
|
slot |
Renames the file currently specified by FileName() to NewName. Returns true if successful; otherwise returns false.
|
slot |
Get the type of the variable.
|
staticslot |
Get the type of the variable.
|
slot |
Writes the content of string to the file. Returns true if successful; otherwise returns false if an error occurred.