7 #ifndef COMPOUNDFILEREADER_H 8 #define COMPOUNDFILEREADER_H 64 virtual void touchFile(
const String& name);
70 virtual void renameFile(
const String& from,
const String& to);
73 virtual int64_t
fileLength(
const String& name);
111 virtual void readInternal(uint8_t* b, int32_t
offset, int32_t length);
115 virtual void seekInternal(int64_t pos);
void ConstructReader(const DirectoryPtr &dir, const String &name, int32_t readBufferSize)
int64_t length
Definition: CompoundFileReader.h:33
virtual void touchFile(const String &name)
Set the modified time of the compound file to now.
virtual bool fileExists(const String &name)
Returns true if a file with the given name exists.
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Return clone of this object.
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
MapStringFileEntryPtr entries
Definition: CompoundFileReader.h:42
DirectoryPtr directory
Definition: CompoundFileReader.h:38
virtual IndexInputPtr openInput(const String &name)
Returns a stream reading an existing file.
Class for accessing a compound stream. This class implements a directory, but is limited to only read...
Definition: CompoundFileReader.h:18
IndexInputPtr stream
Definition: CompoundFileReader.h:41
HashMap< String, FileEntryPtr > MapStringFileEntryPtr
Definition: CompoundFileReader.h:36
virtual IndexOutputPtr createOutput(const String &name)
Not implemented.
String fileName
Definition: CompoundFileReader.h:39
Definition: CompoundFileReader.h:27
boost::shared_ptr< Lock > LockPtr
Definition: LuceneTypes.h:496
A Directory is a flat list of files. 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. Directory locking is implemented by an instance of LockFactory, and can be changed for each Directory instance using setLockFactory.
Definition: Directory.h:18
boost::shared_ptr< Directory > DirectoryPtr
Definition: LuceneTypes.h:489
DirectoryPtr getDirectory()
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
virtual int64_t fileLength(const String &name)
Returns the length of a file in the directory.
int32_t readBufferSize
Definition: CompoundFileReader.h:40
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
virtual ~CompoundFileReader()
boost::shared_ptr< FileEntry > FileEntryPtr
Definition: CompoundFileReader.h:35
int64_t offset
Definition: CompoundFileReader.h:32
virtual LockPtr makeLock(const String &name)
Not implemented.
virtual HashSet< String > listAll()
Returns an array of strings, one for each file in the directory.
virtual void close()
Closes the store.
virtual void deleteFile(const String &name)
Not implemented.
virtual uint64_t fileModified(const String &name)
Returns the time the compound file was last modified.
virtual void renameFile(const String &from, const String &to)
Not implemented.
FileEntry(int64_t offset=0, int64_t length=0)
Definition: CompoundFileReader.h:28
CompoundFileReader(const DirectoryPtr &dir, const String &name)