|
| FS_IndexFile () |
| Default constructor. More...
|
|
| FS_IndexFile (const char *source) |
|
| FS_IndexFile (FS_Reader *reader, const char *source=nullptr) |
|
virtual | ~FS_IndexFile () |
|
bool | hasSection (const UT_StringRef §ion) const |
|
bool | hasTempSection (const UT_StringRef §ion) const |
|
bool | hasRegularSection (const UT_StringRef §ion) const |
|
time_t | getSectionModTime (const UT_StringRef §ion) const |
|
int | getSectionDataSize (const UT_StringRef §ion) const |
|
bool | readSection (const UT_StringRef §ion, char *buffer) const |
|
bool | readSection (const UT_StringRef §ion, UT_WorkBuffer &buffer) const |
|
bool | readOptionsSection (const UT_StringRef §ion, UT_Options &options) const |
|
void | addSection (const UT_StringRef §ion, const char *filename) |
|
void | addSection (const UT_StringRef §ion, const UT_WorkBuffer &buf, time_t modtime=time_t(-1)) |
|
void | addSection (const UT_StringRef §ion, const char *buffer, int len, time_t modtime=time_t(-1)) |
|
void | addSection (const UT_StringRef §ion, const FS_IndexFile &file) |
|
void | modifySection (const UT_StringRef §ion, const char *buffer, int len, time_t modtime=time_t(-1)) |
|
void | modifySection (const UT_StringRef §ion, const UT_WorkBuffer &buf, time_t modtime=time_t(-1)) |
|
void | removeSection (const UT_StringRef §ion) |
|
void | mergeIndexFile (const FS_IndexFile &file, bool overwrite) |
|
void | moveSections (int first, int last, int offset) |
|
time_t | getModTime () const |
|
int64 | getFileDataSize () const |
|
void | setFilters (FS_WriteFilterFactory *encrypt_factory, FS_IStreamFilterFactory *decrypt_factory) |
|
FS_WriteFilterFactory * | getEncryptionFilter () const |
|
FS_IStreamFilterFactory * | getDecryptionFilter () const |
|
FS_Section * | getSection (const UT_StringRef §ion) const |
|
FS_Reader * | getSectionReader (const UT_StringRef §ion) const |
|
FS_ReaderStream * | getSectionStream (const UT_StringRef §ion) const |
|
FS_ReaderStream * | getStreamCopy () const |
|
FS_IndexFileHandle | getIndexFileFromSection (const UT_StringRef §ion, const char *source=nullptr) const |
|
int | getNumSections () const |
|
const UT_StringHolder & | getSectionName (int index) const |
|
const UT_StringHolder & | getSourceFile () const |
|
const UT_StringHolder & | getDescription () const |
|
void | setDescription (const UT_StringHolder &description) |
|
exint | guessStreamSize () const |
|
virtual void | writeFile (std::ostream &os) const |
|
virtual bool | expandToDirectory (const char *destdir) |
|
virtual bool | collapseFromDirectory (const char *srcdir) |
|
bool | isCopyProtected () const |
| Tests if the index file is copy-protected. More...
|
|
bool | isBlackBoxed () const |
| Tests if the index file is black boxed. More...
|
|
bool | isExpanded () const |
| Tests if the index file is stored as expanded. More...
|
|
bool | getSectionFileName (const char *section, UT_String &filename) |
|
Definition at line 43 of file FS_IndexFile.h.
FS_IndexFile::FS_IndexFile |
( |
FS_Reader * |
reader, |
|
|
const char * |
source = nullptr |
|
) |
| |
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.