Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

File Class Reference

#include <File.hpp>

List of all members.

Public Types

typedef off_t offset_type
 Large file offset type.

typedef off_t library_offset_type
 IO library offset type.


Public Methods

 File ()
 ~File ()
void open (const std::string &fileName, int mode)
void close ()
 Closes the File, closing all segments.

void read (void *buffer, offset_type count)
 Read count bytes into buffer from File.

void write (const void *buffer, offset_type count)
 Write count bytes from buffer into File.

void seekg (offset_type relativePosition, std::fstream::seekdir direction)
 Move the get pointer.

void seekp (offset_type relativePosition, std::fstream::seekdir direction)
 Move the put pointer.

offset_type tellg ()
 Return the value of the get pointer.

offset_type tellp ()
 Return the value of the put pointer.

offset_type gcount ()
 Return the number of bytes read by last read.

int rdstate ()
 Returns eof bit set if at end of File.

offset_type size () const
 Returns size of last segment in file.

void unlink ()
 Close and remove File, and all segments from filesystem.


Static Public Methods

void unlink (const std::string &fileName)
 Remove each segment from filesystem.

void rename (const std::string &oldName, const std::string &newName)
 Rename File from oldName to newName. Renames all segments.


Detailed Description

Provide single file interface file date stored in multiple segment files on disk. Keeps each segment size below 2GB for OSes without large file support.


Member Typedef Documentation

typedef off_t File::library_offset_type
 

IO library offset type.

typedef off_t File::offset_type
 

Large file offset type.


Constructor & Destructor Documentation

File::File   [inline]
 

File::~File   [inline]
 


Member Function Documentation

void File::close   [inline]
 

Closes the File, closing all segments.

offset_type File::gcount   [inline]
 

Return the number of bytes read by last read.

void File::open const std::string &    fileName,
int    mode
[inline]
 

Open the file named fileName with the provided mode flags. Initializes individual file segments.

int File::rdstate   [inline]
 

Returns eof bit set if at end of File.

void File::read void *    buffer,
offset_type    count
[inline]
 

Read count bytes into buffer from File.

void File::rename const std::string &    oldName,
const std::string &    newName
[inline, static]
 

Rename File from oldName to newName. Renames all segments.

void File::seekg offset_type    relativePosition,
std::fstream::seekdir    direction
[inline]
 

Move the get pointer.

void File::seekp offset_type    relativePosition,
std::fstream::seekdir    direction
[inline]
 

Move the put pointer.

offset_type File::size   const [inline]
 

Returns size of last segment in file.

offset_type File::tellg   [inline]
 

Return the value of the get pointer.

offset_type File::tellp   [inline]
 

Return the value of the put pointer.

void File::unlink const std::string &    fileName [inline, static]
 

Remove each segment from filesystem.

void File::unlink   [inline]
 

Close and remove File, and all segments from filesystem.

void File::write const void *    buffer,
offset_type    count
[inline]
 

Write count bytes from buffer into File.


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 16:25:41 2004 for Lemur Toolkit by doxygen1.2.18