22 #ifndef FIFE_VFS_VFS_H
23 #define FIFE_VFS_VFS_H
31 #include <boost/shared_ptr.hpp>
44 class VFSSourceProvider;
104 bool exists(
const std::string& file)
const;
126 std::set<std::string>
listFiles(
const std::string& path)
const;
137 std::set<std::string>
listFiles(
const std::string& path,
const std::string& filterregex)
const;
152 std::set<std::string>
listDirectories(
const std::string& path,
const std::string& filterregex)
const;
164 std::set<std::string>
filterList(
const std::set<std::string>& list,
const std::string& fregex)
const;
bool exists(const std::string &file) const
Check if the given file exists.
std::set< std::string > listFiles(const std::string &path) const
Get a filelist of the given directory.
void addProvider(VFSSourceProvider *provider)
add new VFSSourceProvider
VFSSource abstract baseclass.
VFSSource * getSourceForFile(const std::string &file) const
RawData * open(const std::string &path)
Open a file.
type_usedfiles m_usedfiles
VFSSource * createSource(const std::string &path) const
tries to create a new VFSSource for the given file
void removeSource(VFSSource *source)
remove a VFSSource
VFSSourceProvider abstract baseclass.
std::set< std::string > filterList(const std::set< std::string > &list, const std::string &fregex) const
void addSource(VFSSource *source)
Add a new VFSSource.
virtual ~VFS()
Destructor.
bool isDirectory(const std::string &path) const
Check if the given path is a directory.
VFS()
Constructor Called by the Engine on startup.
std::set< std::string > type_usedfiles
the main VFS (virtual file system) class
std::vector< VFSSourceProvider * > type_providers
void addNewSource(const std::string &path)
create a new Source and add it to VFS
type_providers m_providers
Used to access diffrent kinds of data.
std::vector< VFSSource * > type_sources
std::set< std::string > listDirectories(const std::string &path) const
Get a directorylist of the given directory.