fs/Path: add methods GetBase() and GetDirectoryName()

This commit is contained in:
Max Kellermann
2014-12-02 06:44:57 +01:00
parent 2c1f1de33c
commit b227fddec7
4 changed files with 48 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ public:
Bzip2ArchiveFile(Path path, InputStream *_is)
:ArchiveFile(bz2_archive_plugin),
name(PathTraitsFS::GetBase(path.c_str())),
name(path.GetBase().c_str()),
istream(_is) {
// remove .bz2 suffix
const size_t len = name.length();