The purpose of this class is to define a base class for low level random file access that is portable between Win32 and Posix systems.
More...
|
Error | error (Error errid, char *errstr=((void *) 0)) |
| Post an error event. More...
|
|
Error | error (char *err) |
| Post an extended string error message. More...
|
|
void | final (void) |
| Close the file.
|
|
virtual Attr | initialize (void) |
| This method is used to initialize a newly created file as indicated by the "initial" flag. More...
|
|
| RandomFile (const char *name=((void *) 0)) |
| Create an unopened random access file.
|
|
| RandomFile (const RandomFile &rf) |
| Default copy constructor.
|
|
Error | setCompletion (Complete mode) |
| Used to set file completion modes. More...
|
|
void | setError (bool enable) |
| Used to enable or disable throwing of exceptions on errors. More...
|
|
void | setTemporary (bool enable) |
| Used to set the temporary attribute for the file. More...
|
|
void | enter (void) |
|
void | enterMutex (void) |
|
void | leave (void) |
|
void | leaveMutex (void) |
|
bool | test (void) |
|
bool | tryEnterMutex (void) |
|
virtual void | _lock (void) |
|
virtual void | _unlock (void) |
|
void | lock (void) |
| Acquire or increase locking.
|
|
bool | lock (timeout_t timeout) |
| Timed lock request.
|
|
| RecursiveMutex () |
| Create rexlock.
|
|
void | release (void) |
| Release or decrease locking.
|
|
void | exclusive_lock (void) |
| Access interface to exclusive lock the object.
|
|
void | release_exclusive (void) |
| Access interface to release a lock.
|
|
|
enum | Access { accessReadOnly = 00,
accessWriteOnly = 01,
accessReadWrite = 02
} |
|
typedef enum Access | Access |
|
enum | Attr { attrInvalid = 0,
attrPrivate = 0400 | 0200,
attrGroup = attrPrivate | ( 0400 >> 3) | ( 0200 >> 3),
attrPublic = attrGroup | ( ( 0400 >> 3) >> 3) | ( ( 0200 >> 3) >> 3)
} |
|
typedef enum Attr | Attr |
|
enum | Complete { completionImmediate,
completionDelayed,
completionDeferred
} |
|
typedef enum Complete | Complete |
|
enum | Error {
errSuccess = 0,
errNotOpened,
errMapFailed,
errInitFailed,
errOpenDenied,
errOpenFailed,
errOpenInUse,
errReadInterrupted,
errReadIncomplete,
errReadFailure,
errWriteInterrupted,
errWriteIncomplete,
errWriteFailure,
errLockFailure,
errExtended
} |
|
typedef enum Error | Error |
|
enum | Mapping { mappedRead = accessReadOnly,
mappedWrite = accessWriteOnly,
mappedReadWrite = accessReadWrite
} |
|
typedef enum Mapping | Mapping |
|
enum | Open {
openReadOnly = 00,
openWriteOnly = 01,
openReadWrite = 02,
openAppend = 01 | 02000,
openSync = 02 | 04010000,
openTruncate = 02 | 01000
} |
|
typedef enum Open | Open |
|
static char * | getDirname (const char *path, char *buffer, size_t size=4096) |
|
static const char * | getExtension (const char *path) |
|
static const char * | getFilename (const char *path) |
|
static char * | getFilename (const char *path, char *buffer, size_t size=255) |
|
static char * | getRealpath (const char *path, char *buffer, size_t size=4096) |
|
typedef struct ost::File::_fcb | fcb_t |
|
enum | Access { accessReadOnly = 00,
accessWriteOnly = 01,
accessReadWrite = 02
} |
|
typedef enum Access | Access |
|
enum | Attr { attrInvalid = 0,
attrPrivate = 0400 | 0200,
attrGroup = attrPrivate | ( 0400 >> 3) | ( 0200 >> 3),
attrPublic = attrGroup | ( ( 0400 >> 3) >> 3) | ( ( 0200 >> 3) >> 3)
} |
|
typedef enum Attr | Attr |
|
enum | Complete { completionImmediate,
completionDelayed,
completionDeferred
} |
|
typedef enum Complete | Complete |
|
enum | Error {
errSuccess = 0,
errNotOpened,
errMapFailed,
errInitFailed,
errOpenDenied,
errOpenFailed,
errOpenInUse,
errReadInterrupted,
errReadIncomplete,
errReadFailure,
errWriteInterrupted,
errWriteIncomplete,
errWriteFailure,
errLockFailure,
errExtended
} |
|
typedef enum Error | Error |
|
enum | Mapping { mappedRead = accessReadOnly,
mappedWrite = accessWriteOnly,
mappedReadWrite = accessReadWrite
} |
|
typedef enum Mapping | Mapping |
|
enum | Open {
openReadOnly = 00,
openWriteOnly = 01,
openReadWrite = 02,
openAppend = 01 | 02000,
openSync = 02 | 04010000,
openTruncate = 02 | 01000
} |
|
typedef enum Open | Open |
|
static char * | getDirname (const char *path, char *buffer, size_t size=4096) |
|
static const char * | getExtension (const char *path) |
|
static const char * | getFilename (const char *path) |
|
static char * | getFilename (const char *path, char *buffer, size_t size=255) |
|
static char * | getRealpath (const char *path, char *buffer, size_t size=4096) |
|
The purpose of this class is to define a base class for low level random file access that is portable between Win32 and Posix systems.
This class is a foundation both for optimized thread shared and traditional locked file access that is commonly used to build database services, rather than the standard C++ streaming file classes.
- Author
- David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m Portable random disk file access.
Definition at line 376 of file file.h.