Implementation of Main pannel selection of sessions from recent history

AND from folder listing. Re-implementation in C++17 style of
SystemToolkit.
This commit is contained in:
brunoherbelin
2020-07-01 00:16:43 +02:00
parent 1309a479b5
commit d4b793ceb6
7 changed files with 264 additions and 106 deletions

View File

@@ -22,23 +22,29 @@ namespace SystemToolkit
std::string settings_path();
// builds the OS dependent complete file name for a settings file
std::string settings_prepend_path(const std::string& basefilename);
std::string full_filename(const std::string& path, const std::string& filename);
// extract the filename from a full path / URI (e.g. file:://home/me/toto.mpg -> toto.mpg)
std::string filename(const std::string& path);
// extract the base filename from a full path / URI (e.g. file:://home/me/toto.mpg -> toto)
std::string base_filename(const std::string& filename);
std::string base_filename(const std::string& path);
// extract the path of a filename from a full URI (e.g. file:://home/me/toto.mpg -> file:://home/me/)
std::string path_filename(const std::string& filename);
std::string path_filename(const std::string& path);
// Truncate a full filename to display the right part (e.g. file:://home/me/toto.mpg -> ...ome/me/toto.mpg)
std::string trunc_filename(const std::string& path, int lenght);
// extract the extension of a filename
std::string extension_filename(const std::string& filename);
// list all files of a directory mathing the given filter extension (if any)
std::list<std::string> list_directory(const std::string& path, const std::string& filter = "");
// true of file exists
bool file_exists(const std::string& path);
// true if directory could be created
bool create_directory(const std::string& path);
// try to open the file with system
void open(const std::string& path);
}