FileIO implements file-based IO.
More...
#include <FileIO.h>
The FileIO class implements a file-based IO object. It uses the pread() and pwrite() on POSIX systems and ReadFile() and WriteFile() with overlaps on Windows systems.
- See Also
- See examples/src/support.cpp compareFiles() for an example of reading a file.
Definition at line 29 of file FileIO.h.
static void FileIO::deleteFile |
( |
const char * |
path) | |
|
|
static |
This is utility function for deleting a file.
- Parameters
-
static bool FileIO::fileExists |
( |
const char * |
path) | |
|
|
static |
This is utility function for seeing if the file exists.
- Parameters
-
void FileIO::init |
( |
const char * |
path, |
|
|
const char * |
mode |
|
) |
| |
This method initializes the FileIO object with a filename path and access mode.
Modes:
- "r": Open a file for reading.
- "r+": Open a file for reading and writing.
- "w": Truncate or create a file for writing.
- "w+": Truncate or create a file for reading and writing.
- Parameters
-
path | the filename path |
mode | the file access mode |
void FileIO::init |
( |
const char * |
tempdir) | |
|
This method creates temporary file for reading and writing. When the FileIO object is deallocted the temporary file is deleted. If tempdir is NULL the default temporary directory is used.
- Parameters
-
tempdir | the location of the temporary directory |
void FileIO::unlink |
( |
void |
) | |
|
|
virtual |
This method marks the resource for deletion when the object goes away.
Implements IO.
bool FileIO::m_unlinkFile |
|
protected |
The documentation for this class was generated from the following file: