#include <FS_IndexFile.h>

Classes | |
| class | FS_Section |
Public Member Functions | |
| FS_IndexFile () | |
| Default constructor. | |
| FS_IndexFile (const char *source) | |
| FS_IndexFile (FS_Reader *reader, const char *source=NULL) | |
| virtual | ~FS_IndexFile () |
| bool | hasSection (const char *section) const |
| int | getSectionModTime (const char *section) const |
| int | getSectionDataSize (const char *section) const |
| void | readSection (const char *section, char *buffer) const |
| bool | readOptionsSection (const char *section, UT_Options &options) const |
| void | addSection (const char *section, const char *filename) |
| void | addSection (const char *section, UT_OStrStream &os, int modtime=-1) |
| void | addSection (const char *section, const char *buffer, int len, int modtime=-1) |
| void | addSection (const char *section, const FS_IndexFile &file) |
| void | modifySection (const char *section, const char *buffer, int len, int modtime=-1) |
| void | removeSection (const char *section) |
| void | mergeIndexFile (const FS_IndexFile &file, bool overwrite) |
| void | moveSections (int first, int last, int offset) |
| int | getModTime () const |
| int64 | getFileDataSize () const |
| void | setFilters (FS_WriteFilterFactory *encrypt_factory, FS_IStreamFilterFactory *decrypt_factory) |
| FS_WriteFilterFactory * | getEncryptionFilter () const |
| FS_IStreamFilterFactory * | getDecryptionFilter () const |
| FS_Reader * | getSectionReader (const char *section) const |
| FS_ReaderStream * | getSectionStream (const char *section) const |
| FS_ReaderStream * | getStreamCopy () const |
| int | getNumSections () const |
| const char * | getSectionName (int index) const |
| const UT_String & | getSourceFile () const |
| const UT_String & | getDescription () const |
| void | setDescription (const char *description) |
| int | guessStreamSize () const |
| virtual void | writeFile (ostream &os) |
| virtual bool | expandToDirectory (const char *destdir) |
| virtual bool | collapseFromDirectory (const char *srcdir) |
Static Public Member Functions | |
| static int | getCurrentTime () |
Protected Member Functions | |
| void | setModified () |
Definition at line 38 of file FS_IndexFile.h.
| FS_IndexFile::FS_IndexFile | ( | ) |
Default constructor.
| FS_IndexFile::FS_IndexFile | ( | const char * | source | ) |
| FS_IndexFile::FS_IndexFile | ( | FS_Reader * | reader, | |
| const char * | source = NULL | |||
| ) |
This constructor takes a reader that will be used to retrieve section data. The index file takes ownership and will delete the reader in the destructor. (If null is passed in, this object creates its own default FS_Reader, but unless a source is given nothing can be read from such an index file.)
If no source is given, closing the index file and reopening it again will have no effect on the underlying reader. The reader will only be closed and deleted when the index file object is deleted. If a source is passed in, though, the reader will be deleted when the index file is closed and subsequent openings will use the source path to construct a new reader.
| virtual FS_IndexFile::~FS_IndexFile | ( | ) | [virtual] |
| void FS_IndexFile::addSection | ( | const char * | section, | |
| const FS_IndexFile & | file | |||
| ) |
| void FS_IndexFile::addSection | ( | const char * | section, | |
| const char * | buffer, | |||
| int | len, | |||
| int | modtime = -1 | |||
| ) |
| void FS_IndexFile::addSection | ( | const char * | section, | |
| UT_OStrStream & | os, | |||
| int | modtime = -1 | |||
| ) |
| void FS_IndexFile::addSection | ( | const char * | section, | |
| const char * | filename | |||
| ) |
| virtual bool FS_IndexFile::collapseFromDirectory | ( | const char * | srcdir | ) | [virtual] |
Reimplemented in OP_OTLLibrary.
| virtual bool FS_IndexFile::expandToDirectory | ( | const char * | destdir | ) | [virtual] |
Reimplemented in OP_OTLLibrary.
| static int FS_IndexFile::getCurrentTime | ( | ) | [static] |
| FS_IStreamFilterFactory* FS_IndexFile::getDecryptionFilter | ( | ) | const |
| const UT_String& FS_IndexFile::getDescription | ( | ) | const |
| FS_WriteFilterFactory* FS_IndexFile::getEncryptionFilter | ( | ) | const |
| int64 FS_IndexFile::getFileDataSize | ( | ) | const |
| int FS_IndexFile::getModTime | ( | ) | const |
| int FS_IndexFile::getNumSections | ( | ) | const |
| int FS_IndexFile::getSectionDataSize | ( | const char * | section | ) | const |
| int FS_IndexFile::getSectionModTime | ( | const char * | section | ) | const |
| const char* FS_IndexFile::getSectionName | ( | int | index | ) | const |
| FS_Reader* FS_IndexFile::getSectionReader | ( | const char * | section | ) | const |
| FS_ReaderStream* FS_IndexFile::getSectionStream | ( | const char * | section | ) | const |
| const UT_String& FS_IndexFile::getSourceFile | ( | ) | const |
| FS_ReaderStream* FS_IndexFile::getStreamCopy | ( | ) | const |
| int FS_IndexFile::guessStreamSize | ( | ) | const |
| bool FS_IndexFile::hasSection | ( | const char * | section | ) | const |
| void FS_IndexFile::mergeIndexFile | ( | const FS_IndexFile & | file, | |
| bool | overwrite | |||
| ) |
| void FS_IndexFile::modifySection | ( | const char * | section, | |
| const char * | buffer, | |||
| int | len, | |||
| int | modtime = -1 | |||
| ) |
| void FS_IndexFile::moveSections | ( | int | first, | |
| int | last, | |||
| int | offset | |||
| ) |
| bool FS_IndexFile::readOptionsSection | ( | const char * | section, | |
| UT_Options & | options | |||
| ) | const |
| void FS_IndexFile::readSection | ( | const char * | section, | |
| char * | buffer | |||
| ) | const |
| void FS_IndexFile::removeSection | ( | const char * | section | ) |
| void FS_IndexFile::setDescription | ( | const char * | description | ) |
| void FS_IndexFile::setFilters | ( | FS_WriteFilterFactory * | encrypt_factory, | |
| FS_IStreamFilterFactory * | decrypt_factory | |||
| ) |
| void FS_IndexFile::setModified | ( | ) | [protected] |
| virtual void FS_IndexFile::writeFile | ( | ostream & | os | ) | [virtual] |
Reimplemented in OP_OTLLibrary.
1.5.9