CLucene - a full-featured, c++ search engine
API Documentation


lucene::index::CompoundFileReader Class Reference

Class for accessing a compound stream. More...

#include <CompoundFile.h>

Inheritance diagram for lucene::index::CompoundFileReader:
lucene::store::Directory lucene::debug::LuceneBase

List of all members.

Classes

class  CSIndexInput
 Implementation of an IndexInput that reads from a portion of the compound file.
class  FileEntry

Public Member Functions

 CompoundFileReader (lucene::store::Directory *dir, char *name)
 ~CompoundFileReader ()
lucene::store::DirectorygetDirectory ()
const char * getName () const
void close ()
lucene::store::IndexInputopenInput (const char *id)
void list (vector< string > *names) const
 Returns an array of strings, one for each file in the directory->.
bool fileExists (const char *name) const
 Returns true iff a file with the given name exists.
int64_t fileModified (const char *name) const
 Returns the time the named file was last modified.
void touchFile (const char *name)
 Set the modified time of an existing file to now.
void renameFile (const char *from, const char *to)
 Renames an existing file in the directory-> If a file already exists with the new name, then it is replaced.
int64_t fileLength (const char *name) const
 Returns the length of a file in the directory.
lucene::store::IndexOutputcreateOutput (const char *name)
 Not implemented.
lucene::store::LuceneLockmakeLock (const char *name)
 Not implemented.
TCHAR * toString () const
const char * getDirectoryType () const

Static Public Member Functions

static const char * DirectoryType ()

Protected Member Functions

bool doDeleteFile (const char *name)
 Removes an existing file in the directory->.

Detailed Description

Class for accessing a compound stream.

This class implements a directory, but is limited to only read operations. Directory methods that would normally modify data throw an exception.


Constructor & Destructor Documentation

lucene::index::CompoundFileReader::CompoundFileReader ( lucene::store::Directory dir,
char *  name 
)
lucene::index::CompoundFileReader::~CompoundFileReader (  ) 

Member Function Documentation

void lucene::index::CompoundFileReader::close (  )  [virtual]
lucene:: store ::IndexOutput* lucene::index::CompoundFileReader::createOutput ( const char *  name  )  [virtual]

Not implemented.

Exceptions:
UnsupportedOperationException 

Implements lucene::store::Directory.

static const char* lucene::index::CompoundFileReader::DirectoryType (  )  [inline, static]
bool lucene::index::CompoundFileReader::doDeleteFile ( const char *  name  )  [protected, virtual]

Removes an existing file in the directory->.

Implements lucene::store::Directory.

bool lucene::index::CompoundFileReader::fileExists ( const char *  name  )  const [virtual]

Returns true iff a file with the given name exists.

Implements lucene::store::Directory.

int64_t lucene::index::CompoundFileReader::fileLength ( const char *  name  )  const [virtual]

Returns the length of a file in the directory.

Exceptions:
IOException if the file does not exist

Implements lucene::store::Directory.

int64_t lucene::index::CompoundFileReader::fileModified ( const char *  name  )  const [virtual]

Returns the time the named file was last modified.

Implements lucene::store::Directory.

lucene:: store ::Directory* lucene::index::CompoundFileReader::getDirectory (  ) 
const char* lucene::index::CompoundFileReader::getDirectoryType (  )  const [inline, virtual]
const char* lucene::index::CompoundFileReader::getName (  )  const
void lucene::index::CompoundFileReader::list ( vector< string > *  names  )  const [virtual]

Returns an array of strings, one for each file in the directory->.

Implements lucene::store::Directory.

lucene:: store ::LuceneLock* lucene::index::CompoundFileReader::makeLock ( const char *  name  )  [virtual]

Not implemented.

Exceptions:
UnsupportedOperationException 

Implements lucene::store::Directory.

lucene:: store ::IndexInput* lucene::index::CompoundFileReader::openInput ( const char *  id  )  [virtual]
void lucene::index::CompoundFileReader::renameFile ( const char *  from,
const char *  to 
) [virtual]

Renames an existing file in the directory-> If a file already exists with the new name, then it is replaced.

This replacement should be atomic.

Implements lucene::store::Directory.

TCHAR* lucene::index::CompoundFileReader::toString (  )  const [virtual]
void lucene::index::CompoundFileReader::touchFile ( const char *  name  )  [virtual]

Set the modified time of an existing file to now.

Implements lucene::store::Directory.


The documentation for this class was generated from the following file:

clucene.sourceforge.net