Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

extfile::FileWrapper Class Reference

Class for encapsulating file access. More...

#include <File.h>

List of all members.

Public Types

enum  { READ = 1, WRITE = 2 }

Public Methods

 FileWrapper ()
 ~FileWrapper ()
bool open (const char *fname, Int32 mode)
void close (bool destroy=false)
bool read (void *data, Int32 len)
bool write (void *data, Int32 len)
void seek (Int64 pos)


Detailed Description

Class for encapsulating file access.

This class is required to allow 64-bit file access. It is OS specific, since the standard C library calls do not allow 64-bit offsets within files


Member Enumeration Documentation

anonymous enum
 

Flags for open mode.

Enumeration values:
READ  Open file for read access.
WRITE  Open file for write access.


Constructor & Destructor Documentation

extfile::FileWrapper::FileWrapper   [inline]
 

Constructor.

extfile::FileWrapper::~FileWrapper   [inline]
 

Destructor.


Member Function Documentation

void extfile::FileWrapper::close bool    destroy = false [inline]
 

Close the file.

bool extfile::FileWrapper::open const char *    fname,
Int32    mode
[inline]
 

Open a file.

Parameters:
fname  Name of file to open
mode  Open mode, can be a combination of READ and WRITE

bool extfile::FileWrapper::read void *    data,
Int32    len
[inline]
 

Read from file.

Parameters:
data  Buffer to read into
len  Number of bytes to read

void extfile::FileWrapper::seek Int64    pos [inline]
 

Seek within file.

Parameters:
pos  Absolute file position to seek to

bool extfile::FileWrapper::write void *    data,
Int32    len
[inline]
 

Write to file.

Parameters:
data  Buffer to write from
len  Number of bytes to write


The documentation for this class was generated from the following file:
Generated on Wed May 29 11:50:17 2002 for Extent File System by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001