PIDir::name()
This commit is contained in:
@@ -86,6 +86,14 @@ bool PIDir::isAbsolute() const {
|
||||
}
|
||||
|
||||
|
||||
PIString PIDir::name() const {
|
||||
PIStringList fp = absolutePath().split(separator);
|
||||
fp.removeStrings("");
|
||||
if (fp.isEmpty()) return "";
|
||||
return fp.back();
|
||||
}
|
||||
|
||||
|
||||
PIString PIDir::path() const {
|
||||
#ifdef WINDOWS
|
||||
if (path_.startsWith(separator)) {
|
||||
|
||||
@@ -61,6 +61,10 @@ public:
|
||||
const PIString & scanDir() const { return scan_; }
|
||||
|
||||
|
||||
//! \~english Returns name of this directory
|
||||
//! \~russian Возвращает имя директории
|
||||
PIString name() const;
|
||||
|
||||
//! \~english Returns path of this directory
|
||||
//! \~russian Возвращает путь директории
|
||||
PIString path() const;
|
||||
|
||||
Reference in New Issue
Block a user