#include <FileResource.h>

Public Member Functions | |
| FileResource (const char *pFilename, const char *pAccess, bool deleteOnClose=false) | |
| operator FILE * () | |
| bool | getDeleteOnClose () const |
| void | setDeleteOnClose (bool deleteOnClose) |
This class has a conversion operator to allow a FileResource object to be used wherever a FILE* would normally be used.
Definition at line 109 of file FileResource.h.
| FileResource::FileResource | ( | const char * | pFilename, | |
| const char * | pAccess, | |||
| bool | deleteOnClose = false | |||
| ) |
Constructs a Resource object that wraps a FILE*.
Opens the specified file using the specified access modes.
| pFilename | The name of the file to open. | |
| pAccess | The access mode to open the file with. These match the modes used with fopen(). | |
| deleteOnClose | If true, the file will be deleted from the file system after it is closed. If false, the file will simply be closed. |
Definition at line 126 of file FileResource.h.
| FileResource::operator FILE * | ( | ) |
Returns a pointer to the underlying FILE.
This operator allows the FileResource object to be used wherever a FILE* would normally be used.
Definition at line 138 of file FileResource.h.
| bool FileResource::getDeleteOnClose | ( | ) | const |
Returns whether the file will be deleted after it is closed.
true if the file will be deleted after it is closed, or false if the file will simply be closed. Definition at line 149 of file FileResource.h.
| void FileResource::setDeleteOnClose | ( | bool | deleteOnClose | ) |
Sets whether the file will be deleted after it is closed.
| deleteOnClose | If set to true, the file will be deleted after it is closed. If set to false, the file will simply close without being deleted. |
Definition at line 163 of file FileResource.h.