Public Member Functions | |
FileSystemManager () | |
Initilize the virtual file system so it can be now accessed. | |
~FileSystemManager () | |
Release used memory and force all modules to unload. | |
Result | addFilesystem (SharedPtr< IFileSystem > fs) |
Result | removeFilesystem (const std::string &name) |
SharedPtr< IFileSystem > | getFilesystem (const std::string &name) |
Engine's does use a file system manger to manage all available file systems. This fs is called virtual file system or VFS. You as user of the engine does use this vfs to get the data from files. The system is working transparent, so you does not notice where the files are readed from.
Each certain module should register by this manager so the user get access to the file sstem provided by the module.
Definition at line 120 of file FileSystemManager.h.
Result nrEngine::FileSystemManager::addFilesystem | ( | SharedPtr< IFileSystem > | fs | ) |
Register a new file system by the manager. The file systems are used to access the files
fs | Smart pointer on the file system object |
Result nrEngine::FileSystemManager::removeFilesystem | ( | const std::string & | name | ) |
Remove a certain filesystem from the list. This will unload the filesystem smart pointer, so if it not used anymore the filesystem will be removed from the memory. This should also close all opened files.
name | Name of the file system |
SharedPtr<IFileSystem> nrEngine::FileSystemManager::getFilesystem | ( | const std::string & | name | ) |
Get the file system by it's type name.
name | Name of the file system |