DubiousEngine
0.2.0
Simple Game Engine
|
Path and Filename information. More...
#include <File_path.h>
Public Member Functions | |
File_path (const std::string &Path) | |
Constructor. More... | |
std::string | full_path () const |
Returns the full path that you specified to the constructor. More... | |
std::string | path () const |
Returns just the path part of the full path. More... | |
std::string | file () const |
Returns just the file part. This means only the last token. More... | |
Path and Filename information.
The FilePath object is used to hold path and file information. This is a simple helper class that just moves all of the annoying path parsing into one central location. It only uses the '/' character as a separator.
Dubious::Utility::File_path::File_path | ( | const std::string & | Path | ) |
Constructor.
Takes in a Path in the usual form. It's smart enough to figure out if it's a full or relative path. Passing it an empty string will throw an exception
Path | - [in] the path: /blah/blah/file.txt |
std::string Dubious::Utility::File_path::file | ( | ) | const |
Returns just the file part. This means only the last token.
std::string Dubious::Utility::File_path::full_path | ( | ) | const |
Returns the full path that you specified to the constructor.
std::string Dubious::Utility::File_path::path | ( | ) | const |
Returns just the path part of the full path.
This means everything except the final token. Note that this will end in a final '/'