FIFE
2008.0
|
#include <vfsdirectory.h>
Public Member Functions | |
VFSDirectory (VFS *vfs, const std::string &root="./") | |
virtual | ~VFSDirectory () |
virtual bool | fileExists (const std::string &filename) const |
virtual RawData * | open (const std::string &filename) const |
std::set< std::string > | listFiles (const std::string &path) const |
std::set< std::string > | listDirectories (const std::string &path) const |
The most basic VFSSource for "normal" filesystems. For example, '/' or './tests/data'.
Uses boost_filesystem to achieve Plattform independancy. This also means you have to use slashes as directory separators.
Definition at line 44 of file vfsdirectory.h.
FIFE::VFSDirectory::VFSDirectory | ( | VFS * | vfs, |
const std::string & | root = "./" |
||
) |
Constructor Creates the given file system's VFS Source, Uses boost_filesystem to achieve Plattform independancy.
Definition at line 65 of file vfsdirectory.cpp.
FIFE::VFSDirectory::~VFSDirectory | ( | ) | [virtual] |
Destructor
Definition at line 72 of file vfsdirectory.cpp.
bool FIFE::VFSDirectory::fileExists | ( | const std::string & | filename | ) | const [virtual] |
Tests whether a file can be opened.
filename | The file to test. |
Implements FIFE::VFSSource.
Definition at line 76 of file vfsdirectory.cpp.
std::set< std::string > FIFE::VFSDirectory::listDirectories | ( | const std::string & | path | ) | const [virtual] |
List directories in a directory
path | The directory to list the directories in |
Implements FIFE::VFSSource.
Definition at line 93 of file vfsdirectory.cpp.
std::set< std::string > FIFE::VFSDirectory::listFiles | ( | const std::string & | path | ) | const [virtual] |
List files in a directory
path | The directory to list the files in |
Implements FIFE::VFSSource.
Definition at line 89 of file vfsdirectory.cpp.
RawData * FIFE::VFSDirectory::open | ( | const std::string & | filename | ) | const [virtual] |
Opens a file.
filename | The file to open. |
Implements FIFE::VFSSource.
Definition at line 85 of file vfsdirectory.cpp.