#include <FileIO.h>
Public Member Functions | |
void | init (const char *path, const char *mode) |
Initialize with the file path and access mode. | |
void | init (const char *tempdir) |
Create a temporary file for readeing and writing. | |
void | unlink (void) |
Delete the resource when the IO object is deleted. | |
Static Public Member Functions | |
static void | deleteFile (const char *path) |
Delete a file. | |
static bool | fileExists (const char *path) |
Test if the file exists. | |
Protected Attributes | |
Mutex | m_openLock |
int | m_openCount |
bool | m_unlinkFile |
Definition at line 30 of file FileIO.h.
void FileIO::init | ( | const char * | path, | |
const char * | mode | |||
) |
This method initializes the FileIO object with a filename path and access mode.
Modes:
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.
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.
static void FileIO::deleteFile | ( | const char * | path | ) | [static] |
This is utility function for deleting a file.
path | path to the file |
static bool FileIO::fileExists | ( | const char * | path | ) | [static] |
This is utility function for seeing if the file exists.
path | path to the file |
Mutex FileIO::m_openLock [protected] |
int FileIO::m_openCount [protected] |
bool FileIO::m_unlinkFile [protected] |
LizardTech |