Inheritance diagram for mortic::IFileManager:

Public Member Functions | |
| IFileManager (IRoot *root) | |
| Constructor. | |
| virtual | ~IFileManager () |
| Destructor. | |
| virtual void | mount (IMount *mnt, std::string path)=0 |
| Mounts a mountable. | |
| virtual void | unmount (std::string path)=0 |
| Unmounts a mountable. | |
| virtual void | mountReal (std::string real, std::string path)=0 |
| Mounts a real path. | |
| virtual void | mountMirror (std::string from, std::string to)=0 |
| Mirrors one path to another. | |
| virtual IFile * | open (std::string filename, bool write=false, bool append=false)=0 |
| Opens a file. | |
| virtual bool | exists (std::string filename)=0 |
| Checks if a file / directory exists. | |
| virtual bool | isDirectory (std::string filename)=0 |
| Checks to see if the path given is a directory. | |
| virtual std::vector< std::string > | listDir (std::string path)=0 |
| Returns a list of files/directories in the directory. | |
| virtual unsigned int | size (std::string filename)=0 |
| Returns the size of a file. | |
This class lets you open and close files. It also will include a virtual file system, much like linux, that will let you mount directories and websites, memory, etc. on paths inside mortic. For example, "/config/config.xml" could map to "~/.example_game/config.xml", and "/update/updates.txt" could map to "http://www.example_game.net/updater/updates.txt". This allows for a lot of flexibility.
Definition at line 107 of file IFileManager.h.
|
|
Constructor.
Definition at line 111 of file IFileManager.h. |
|
|
Destructor.
Definition at line 114 of file IFileManager.h. |
|
|
Checks if a file / directory exists. Checks to see if the given VFS path exists.
|
|
|
Checks to see if the path given is a directory. This is for checking the directoryness of a file. Kinda useful!
|
|
|
Returns a list of files/directories in the directory. This is to check what files there are in the directory given.
|
|
||||||||||||
|
Mounts a mountable. This mounts an IMount class at the given path. This class must be made with new, as it will be deleted upon unmount. |
|
||||||||||||
|
Mirrors one path to another. This function mounts one place in the VFS on another.
|
|
||||||||||||
|
Mounts a real path. This function maps a real harddisk path to a VFS path.
|
|
||||||||||||||||
|
Opens a file. Opens the file at the VFS path given. |
|
|
Returns the size of a file. Directories return 0.
|
|
|
Unmounts a mountable. This unmounts the mountable at path, and then deletes it. |
1.4.4