![]() | Macro Programming | ![]() |
#include <file.h>
Public Member Functions | |
void | close () |
close file | |
void | find (string path, string s) |
find file | |
void | findNext () |
find next | |
bool | open (bool mode=true) |
open file | |
string | read () |
read file | |
void | write (string s) |
write file | |
Public Attributes | |
string | filename |
filename |
This class provides a interface for reading and writing on files.
void file::close | ( | ) |
close file
The file is closed.
find file
Find a file matching to the search string s. If a match is found, filename is set. Otherwise filename is set to "".
void file::findNext | ( | ) |
find next
Find an other file match to a previous find. If a match is found, filename is set. Otherwise filename is set to "".
bool file::open | ( | bool | mode = true |
) |
open file
Open a file. The filename had to be set prior to the property filename. If mode is true, the file is opened in readonly mode. If mode is false, the file is open as writeonly mode.
string file::read | ( | ) |
read file
void file::write | ( | string | s | ) |
write file
The file is overwrite with the string s
filename
Name of the file to operate with.