fs/Path: add methods GetBase() and GetDirectoryName()
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
class AllocatedPath;
|
||||
|
||||
/**
|
||||
* A path name in the native file system character set.
|
||||
*
|
||||
@@ -128,6 +130,22 @@ public:
|
||||
gcc_pure
|
||||
std::string ToUTF8() const;
|
||||
|
||||
/**
|
||||
* Determine the "base" file name.
|
||||
* The return value points inside this object.
|
||||
*/
|
||||
gcc_pure
|
||||
Path GetBase() const {
|
||||
return FromFS(PathTraitsFS::GetBase(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets directory name of this path.
|
||||
* Returns a "nulled" instance on error.
|
||||
*/
|
||||
gcc_pure
|
||||
AllocatedPath GetDirectoryName() const;
|
||||
|
||||
/**
|
||||
* Determine the relative part of the given path to this
|
||||
* object, not including the directory separator. Returns an
|
||||
|
Reference in New Issue
Block a user