![]() |
Public API Reference |
Helper class to change the current VFS directory and restore the previous directory when an instance goes out of scope. More...
#include <cstool/vfsdirchange.h>
Public Member Functions | |
| bool | ChangeTo (const char *filename) |
| Change to the directory filename is in. | |
| bool | ChangeToFull (const char *filename) |
| As above, except that the full path is treated as the directory to change to. | |
| csVfsDirectoryChanger (iVFS *vfs) | |
| Create instance. | |
| void | PushDir () |
| Just pushes the current directory, but doesn't change it in anyway - useful when you want to call ChDir() or ChDirAuto() manually for some reason, but still want to have the current directory restored automatically. | |
| ~csVfsDirectoryChanger () | |
| Destroy instance. Restores the old directory if ChangeTo() was called. | |
Helper class to change the current VFS directory and restore the previous directory when an instance goes out of scope.
Definition at line 31 of file vfsdirchange.h.
| csVfsDirectoryChanger::csVfsDirectoryChanger | ( | iVFS * | vfs | ) | [inline] |
Create instance.
Definition at line 41 of file vfsdirchange.h.
| csVfsDirectoryChanger::~csVfsDirectoryChanger | ( | ) | [inline] |
Destroy instance. Restores the old directory if ChangeTo() was called.
Definition at line 43 of file vfsdirchange.h.
| bool csVfsDirectoryChanger::ChangeTo | ( | const char * | filename | ) | [inline] |
Change to the directory filename is in.
Definition at line 53 of file vfsdirchange.h.
| bool csVfsDirectoryChanger::ChangeToFull | ( | const char * | filename | ) | [inline] |
As above, except that the full path is treated as the directory to change to.
Definition at line 69 of file vfsdirchange.h.
| void csVfsDirectoryChanger::PushDir | ( | ) | [inline] |
Just pushes the current directory, but doesn't change it in anyway - useful when you want to call ChDir() or ChDirAuto() manually for some reason, but still want to have the current directory restored automatically.
Definition at line 89 of file vfsdirchange.h.