|
FIFE
|
The most basic VFSSource for "normal" filesystems. More...
#include <vfsdirectory.h>
Inheritance diagram for FIFE::VFSDirectory:
Collaboration diagram for FIFE::VFSDirectory:Public Member Functions | |
| VFSDirectory (VFS *vfs, const std::string &root="./") | |
| Constructor Creates the given file system's VFS Source, Uses boost_filesystem to achieve Plattform independancy. More... | |
| virtual | ~VFSDirectory () |
| Destructor. More... | |
| virtual bool | fileExists (const std::string &filename) const |
| Tests whether a file can be opened. More... | |
| virtual RawData * | open (const std::string &filename) const |
| Opens a file. More... | |
| std::set< std::string > | listFiles (const std::string &path) const |
| List files in a directory. More... | |
| std::set< std::string > | listDirectories (const std::string &path) const |
| List directories in a directory. More... | |
Public Member Functions inherited from FIFE::VFSSource | |
| VFSSource (VFS *vfs) | |
| virtual | ~VFSSource () |
| VFS * | getVFS () const |
| get the VFS this source is associated with. More... | |
Private Member Functions | |
| std::set< std::string > | list (const std::string &path, bool directorys) const |
Private Attributes | |
| std::string | m_root |
Additional Inherited Members | |
Protected Member Functions inherited from FIFE::VFSSource | |
| std::string | fixPath (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 44 of file vfsdirectory.cpp.
References FIFE::_log, FL_DBG, and m_root.
|
virtual |
Destructor.
Definition at line 51 of file vfsdirectory.cpp.
|
virtual |
Tests whether a file can be opened.
| filename | The file to test. |
Implements FIFE::VFSSource.
Definition at line 55 of file vfsdirectory.cpp.
References m_root.
|
private |
Definition at line 79 of file vfsdirectory.cpp.
References FIFE::GetFilenameFromDirectoryIterator(), and m_root.
Referenced by listDirectories(), and listFiles().
Here is the caller graph for this function:
|
virtual |
List directories in a directory.
| path | The directory to list the directories in |
Implements FIFE::VFSSource.
Definition at line 75 of file vfsdirectory.cpp.
References list().
|
virtual |
List files in a directory.
| path | The directory to list the files in |
Implements FIFE::VFSSource.
Definition at line 71 of file vfsdirectory.cpp.
References list().
|
virtual |
Opens a file.
| filename | The file to open. |
Implements FIFE::VFSSource.
Definition at line 67 of file vfsdirectory.cpp.
References m_root.
|
private |
Definition at line 80 of file vfsdirectory.h.
Referenced by fileExists(), list(), open(), and VFSDirectory().