Platform-agnostic handling of directory paths.
More...
#include <Path.hpp>
|
|
void | init (void) |
| | Initialize the platform's native path delimiter.
|
|
| Path (void) |
| | Default constructor; initialize the native path delimiter.
|
|
| ~Path (void) |
| | Destructor; nothing to clean up (automatic clean up).
|
| | Path (const std::string &p) |
| | Construct a complete object.
|
| const value_type & | native (void) const |
|
const std::string & | path (void) const |
| | Obtain assigned pathname.
|
|
Path & | operator= (const Path &rhs) |
| | Assignment operator.
|
| std::string | prepend (const std::string &path) const |
| | Add the set object's file path to the beginning of a file path.
|
Platform-agnostic handling of directory paths.
Inspired by Boost::Filesystem
- See also
- http://www.boost.org/doc/libs/1_55_0/libs/filesystem/doc/reference.html#class-path
Definition at line 41 of file Path.hpp.
◆ value_type
Platform-dependent data typedef used for defining the preferred file path separator.
- See also
- ::init.
Definition at line 48 of file Path.hpp.
◆ Path()
| nom::Path::Path |
( |
const std::string & | p | ) |
|
Construct a complete object.
- Parameters
-
| p | The relative or absolute path to a file or directory. |
◆ native()
| const value_type & nom::Path::native |
( |
void | | ) |
const |
Obtain native path (directory) separator; the value returned is dependent upon the platform and is determined at compile-time, not run-time.
◆ prepend()
| std::string nom::Path::prepend |
( |
const std::string & | path | ) |
const |
Add the set object's file path to the beginning of a file path.
- Returns
- If the set file path does not end with a backslash character, one is appended beforehand, otherwise the object's file path is appended to the specified file path.
- Todo
- Rename to append.
◆ path_separator
◆ pathname
| std::string nom::Path::pathname |
|
private |
The documentation for this class was generated from the following file:
- /home/jeff/Projects/nomlib.git/include/nomlib/system/Path.hpp