utils: Add Mu::canonicalize_filename

We need it for unit-tests
This commit is contained in:
Dirk-Jan C. Binnema
2020-06-27 17:00:57 +03:00
parent 6061898c2b
commit 1b056f4c51
3 changed files with 27 additions and 4 deletions

View File

@ -131,6 +131,16 @@ constexpr int64_t to_s (Duration d) { return to_unit<std::chrono::seconds>(d);
constexpr int64_t to_ms (Duration d) { return to_unit<std::chrono::milliseconds>(d); }
constexpr int64_t to_us (Duration d) { return to_unit<std::chrono::microseconds>(d); }
/**
* See g_canonicalize_filename
*
* @param filename
* @param relative_to
*
* @return
*/
std::string canonicalize_filename(const std::string& path, const std::string& relative_to);
/**
* Convert a size string to a size in bytes
*
@ -205,8 +215,6 @@ private:
const bool color_;
};
/**
*
* don't repeat these catch blocks everywhere...