Manipulate path strings.
More...
#include <vici/stringy.h>
|
|
static bool | check (const std::string &path) |
| | checks for valid string
|
| |
|
static void | setSpacePolicy (bool allowSpaces=false) |
| | set policy for spaces in file names
|
| |
Constructor.
normalizes out any surplus /'s
- Parameters
-
| path | path to a file or directory |
| bool Path::absolute |
( |
| ) |
const |
- Returns
- true if its an absolute path
Append aname to a path.
- Parameters
-
| name | append a / and name to this |
- Returns
- reference to new value of this
Append an extension to this.
- Parameters
-
| ext | the extension to append. |
- Returns
- reference to new value of this
| string Path::base |
( |
| ) |
const |
- Returns
- everything after last /
| bool Path::defined |
( |
| ) |
const |
type conversion
true if it has a value
| string Path::dir |
( |
| ) |
const |
- Returns
- everything up to last /
| string Path::ext |
( |
| ) |
const |
- Returns
- extension part of file name
| bool Path::isChildOf |
( |
const Path & |
p | ) |
const |
test for equality
test for equality true if this is a subdir of p
| string Path::name |
( |
| ) |
const |
- Returns
- base without the extension
| string Path::noExt |
( |
| ) |
const |
- Returns
- everything but extension
| void Path::split |
( |
std::vector< std::string > & |
dirs | ) |
const |
break into separate dirs
- Parameters
-
| dirs | The directory parts of the file name returned. |
shorten this by a level
- Returns
- reference to new value of this
The documentation for this class was generated from the following files: