Ref T258, utility functions

This commit is contained in:
Klaus Basan
2018-02-22 00:57:30 +01:00
parent b5a32f3c5d
commit 68d4243ca7
4 changed files with 20 additions and 0 deletions

View File

@@ -406,6 +406,12 @@ namespace BlackMisc
return fixedPaths;
}
QString CFileUtils::toWindowsLocalPath(const QString &path)
{
QString p = CFileUtils::fixWindowsUncPath(path);
return p.replace('/', '\\');
}
QString CFileUtils::humanReadableFileSize(qint64 size)
{
// from https://stackoverflow.com/a/30958189/356726