FIFE 2008.0
|
#include <dat2.h>
Public Member Functions | |
DAT2 (VFS *vfs, const std::string &path) | |
bool | fileExists (const std::string &name) const |
RawData * | open (const std::string &file) const |
const RawDataDAT2::s_info & | getInfo (const std::string &name) const |
std::set< std::string > | listFiles (const std::string &pathstr) const |
std::set< std::string > | listDirectories (const std::string &pathstr) const |
VFSource for the Fallout2 DAT file format
Implements a kind of lazy initializing, by reading the file list in chunks. Behaviour is the same as if it wouldn't do this, but startup is very fast. But a open/fileExists call with a filename that doesn't exist, does trigger completely loading the file entries.
FIFE::DAT2::DAT2 | ( | VFS * | vfs, |
const std::string & | path | ||
) |
bool FIFE::DAT2::fileExists | ( | const std::string & | file | ) | const [virtual] |
check if the given file exists
file | filename to check |
Implements FIFE::VFSSource.
const RawDataDAT2::s_info & FIFE::DAT2::getInfo | ( | const std::string & | name | ) | const |
std::set< std::string > FIFE::DAT2::listDirectories | ( | const std::string & | path | ) | const [virtual] |
list all directories in a directory of this source
path | path to list directories in Will return an empty list on any error |
Implements FIFE::VFSSource.
std::set< std::string > FIFE::DAT2::listFiles | ( | const std::string & | path | ) | const [virtual] |
list all files in a directory of this source
path | path to list files in Will return an empty list on any error |
Implements FIFE::VFSSource.
RawData * FIFE::DAT2::open | ( | const std::string & | file | ) | const [virtual] |
open a file inside this source
file | the file to open |
CannotOpenFile | if the file can't be found |
Implements FIFE::VFSSource.
Definition at line 107 of file dat2.cpp.
References getInfo(), and FIFE::VFSSource::getVFS().