PIDir::name()

This commit is contained in:
2023-04-22 23:22:23 +03:00
parent 2780dacb48
commit ee7251c17c
2 changed files with 12 additions and 0 deletions

View File

@@ -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)) {