aboutsummaryrefslogtreecommitdiff
path: root/include/Path.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-22 22:46:29 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-22 23:23:13 +0200
commita8e0846a7c111a8d5b5cf8592ecb9b9bbd15ce26 (patch)
tree0ada7bf9bcb31fffd698e261d8ecfc0c85f1d2de /include/Path.hpp
parenta29f310b8ad0b088860fe05a5499bccef963a503 (diff)
Initial file manager implementation, with thumbnail caching
Diffstat (limited to 'include/Path.hpp')
-rw-r--r--include/Path.hpp8
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