Woopsi 1.0
GUI Framework for Nintendo DS Homebrew
|
#include <filepath.h>
Public Member Functions | |
FilePath (const WoopsiString &path) | |
~FilePath () | |
void | setPath (const WoopsiString &path) |
const WoopsiString & | getPath () const |
void | appendPath (const WoopsiString &path) |
void | goToParent () |
void | goToRoot () |
Class designed to simplify parsing path strings. If told to append the current directory to its current path, the path will not change. If told to append the parent directory, the current directory is stripped from the path. The path string is therefore always as short as possible.
Used by the FileListBox.
WoopsiUI::FilePath::FilePath | ( | const WoopsiString & | path | ) |
Constructor.
path | Initial path. |
WoopsiUI::FilePath::~FilePath | ( | ) | [inline] |
Destructor.
void WoopsiUI::FilePath::appendPath | ( | const WoopsiString & | path | ) |
Append a new path component to the current path. Automatically inserts trailing slash.
path | Path to add to the end of the current path. |
const WoopsiString& WoopsiUI::FilePath::getPath | ( | ) | const [inline] |
Get the path.
void WoopsiUI::FilePath::goToParent | ( | ) |
Move from the current directory to its parent, if possible.
void WoopsiUI::FilePath::goToRoot | ( | ) |
Go to the root of the filesystem.
void WoopsiUI::FilePath::setPath | ( | const WoopsiString & | path | ) |
Set the path.
path | The new path. |