CLucene - a full-featured, c++ search engine
API Documentation
#include <Directory.h>
Public Member Functions | |
virtual | ~Directory () |
char ** | list () const |
virtual void | list (std::vector< std::string > *names) const =0 |
virtual bool | fileExists (const char *name) const =0 |
virtual int64_t | fileModified (const char *name) const =0 |
virtual int64_t | fileLength (const char *name) const =0 |
virtual IndexInput * | openInput (const char *name)=0 |
virtual IndexInput * | openInput (const char *name, int32_t bufferSize) |
virtual void | touchFile (const char *name)=0 |
Set the modified time of an existing file to now. */. | |
virtual bool | deleteFile (const char *name, const bool throwError=true) |
virtual void | renameFile (const char *from, const char *to)=0 |
virtual IndexOutput * | createOutput (const char *name)=0 |
virtual LuceneLock * | makeLock (const char *name) |
virtual void | clearLock (const char *name) |
virtual void | close ()=0 |
virtual TCHAR * | toString () const =0 |
virtual const char * | getDirectoryType () const =0 |
void | setLockFactory (LockFactory *lockFactory) |
LockFactory * | getLockFactory () |
virtual TCHAR * | getLockID () |
Protected Member Functions | |
Directory () | |
virtual bool | doDeleteFile (const char *name)=0 |
Protected Attributes | |
LockFactory * | lockFactory |
Files may be written once, when they are created. Once a file is created it may only be opened for read, or deleted. Random access is permitted both when reading and writing.
Direct i/o is not used directly, but rather all i/o is through this API. This permits things such as:
lucene::store::Directory::Directory | ( | ) | [inline, protected] |
virtual lucene::store::Directory::~Directory | ( | ) | [virtual] |
virtual bool lucene::store::Directory::doDeleteFile | ( | const char * | name | ) | [protected, pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
char** lucene::store::Directory::list | ( | ) | const |
virtual void lucene::store::Directory::list | ( | std::vector< std::string > * | names | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory.
virtual bool lucene::store::Directory::fileExists | ( | const char * | name | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual int64_t lucene::store::Directory::fileModified | ( | const char * | name | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual int64_t lucene::store::Directory::fileLength | ( | const char * | name | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual IndexInput* lucene::store::Directory::openInput | ( | const char * | name | ) | [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual IndexInput* lucene::store::Directory::openInput | ( | const char * | name, | |
int32_t | bufferSize | |||
) | [virtual] |
Reimplemented in lucene::store::FSDirectory.
virtual void lucene::store::Directory::touchFile | ( | const char * | name | ) | [pure virtual] |
Set the modified time of an existing file to now. */.
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual bool lucene::store::Directory::deleteFile | ( | const char * | name, | |
const bool | throwError = true | |||
) | [virtual] |
virtual void lucene::store::Directory::renameFile | ( | const char * | from, | |
const char * | to | |||
) | [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual IndexOutput* lucene::store::Directory::createOutput | ( | const char * | name | ) | [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual LuceneLock* lucene::store::Directory::makeLock | ( | const char * | name | ) | [virtual] |
virtual void lucene::store::Directory::clearLock | ( | const char * | name | ) | [virtual] |
virtual void lucene::store::Directory::close | ( | ) | [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual TCHAR* lucene::store::Directory::toString | ( | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory, and lucene::store::RAMDirectory.
virtual const char* lucene::store::Directory::getDirectoryType | ( | ) | const [pure virtual] |
Implemented in lucene::store::FSDirectory.
void lucene::store::Directory::setLockFactory | ( | LockFactory * | lockFactory | ) |
LockFactory* lucene::store::Directory::getLockFactory | ( | ) |
virtual TCHAR* lucene::store::Directory::getLockID | ( | ) | [virtual] |
LockFactory* lucene::store::Directory::lockFactory [protected] |