Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
67 static uint64_t
fileModified(
const String& directory,
const String& name);
106 virtual void sync(
const String& name);
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
boost::shared_ptr< LockFactory > LockFactoryPtr
Definition: LuceneTypes.h:497
A Directory is a flat list of files. Files may be written once, when they are created....
Definition: Directory.h:18
virtual String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory ...
String directory
The underlying filesystem directory.
Definition: FSDirectory.h:50
void initOutput(const String &name)
Initializes the directory to create a new file with the given name. This method should be used in cre...
virtual void deleteFile(const String &name)
Removes an existing file in the directory.
void setReadChunkSize(int32_t chunkSize)
Sets the maximum number of bytes read at once from the underlying file during IndexInput#readBytes....
void createDir()
Create file system directory.
boost::shared_ptr< FSDirectory > FSDirectoryPtr
Definition: LuceneTypes.h:491
FSDirectory(const String &path, const LockFactoryPtr &lockFactory)
Create a new FSDirectory for the named location (ctor for subclasses).
static FSDirectoryPtr open(const String &path)
Creates an FSDirectory instance.
String getFile()
Return file system directory.
virtual HashSet< String > listAll()
Lists all files (not subdirectories) in the directory.
virtual void close()
Closes the store to future operations.
virtual String toString()
For debug output.
static HashSet< String > listAll(const String &dir)
Lists all files (not subdirectories) in the directory.
Definition: AbstractAllTermDocs.h:12
virtual int64_t fileLength(const String &name)
Returns the length in bytes of a file in the directory.
bool checked
Definition: FSDirectory.h:47
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
static const int32_t DEFAULT_READ_CHUNK_SIZE
Default read chunk size. This is a conditional default based on operating system.
Definition: FSDirectory.h:39
virtual uint64_t fileModified(const String &name)
Returns the time the named file was last modified.
static uint64_t fileModified(const String &directory, const String &name)
Returns the time the named file was last modified.
int32_t chunkSize
Definition: FSDirectory.h:53
virtual void sync(const String &name)
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit ...
Base class for Directory implementations that store index files in the file system....
Definition: FSDirectory.h:29
virtual void touchFile(const String &name)
Set the modified time of an existing file to now.
static FSDirectoryPtr open(const String &path, const LockFactoryPtr &lockFactory)
Just like open(File), but allows you to also specify a custom LockFactory.
virtual bool fileExists(const String &name)
Returns true if a file with the given name exists.
int32_t getReadChunkSize()
The maximum number of bytes to read at once from the underlying file during IndexInput#readBytes.
clucene.sourceforge.net