diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-22 22:46:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-22 23:23:13 +0200 |
commit | a8e0846a7c111a8d5b5cf8592ecb9b9bbd15ce26 (patch) | |
tree | 0ada7bf9bcb31fffd698e261d8ecfc0c85f1d2de /include/Path.hpp | |
parent | a29f310b8ad0b088860fe05a5499bccef963a503 (diff) |
Initial file manager implementation, with thumbnail caching
Diffstat (limited to 'include/Path.hpp')
-rw-r--r-- | include/Path.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/Path.hpp b/include/Path.hpp index bd978bc..bdc31c1 100644 --- a/include/Path.hpp +++ b/include/Path.hpp @@ -26,6 +26,14 @@ namespace QuickMedia { return *this; } + // Returns empty string if no extension + const char* ext() const { + size_t index = data.rfind('.'); + if(index == std::string::npos) + return ""; + return data.c_str() + index; + } + std::string data; }; }
\ No newline at end of file |