mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Improved support for loading files, and support for file drop
This commit is contained in:
@@ -70,22 +70,13 @@ std::string SystemToolkit::base_filename(const std::string& filename)
|
||||
std::string SystemToolkit::path_filename(const std::string& filename)
|
||||
{
|
||||
std::string path = filename.substr(0, filename.find_last_of(PATH_SEP) + 1);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
// TODO : for windows path C:\gstreamer\1.0\x86\bin\pima.mp3 <=> file:///C:/gstreamer/1.0/x86/bin/pima.mp3
|
||||
std::string SystemToolkit::path_to_uri(const std::string& path)
|
||||
std::string SystemToolkit::extension_filename(const std::string& filename)
|
||||
{
|
||||
std::string uri = "file://" + path;
|
||||
return uri;
|
||||
}
|
||||
|
||||
std::string SystemToolkit::uri_to_path(const std::string& uri)
|
||||
{
|
||||
// prefix "file://" of lenght 7
|
||||
std::string path = uri.substr(7);
|
||||
return path;
|
||||
std::string ext = filename.substr(filename.find_last_of(".") + 1);
|
||||
return ext;
|
||||
}
|
||||
|
||||
std::string SystemToolkit::home_path()
|
||||
|
||||
Reference in New Issue
Block a user