Ref T253, utility functions to support UNC

This commit is contained in:
Klaus Basan
2018-02-17 06:23:44 +01:00
parent f265222a45
commit 5cc70c2903
3 changed files with 21 additions and 3 deletions

View File

@@ -114,6 +114,11 @@ namespace BlackMisc
return QDir::cleanPath(path1 + QChar('/') + path2);
}
QString CFileUtils::appendFilePathsAndFixUnc(const QString &path1, const QString &path2)
{
return CFileUtils::fixWindowsUncPath(appendFilePaths(path1, path2));
}
QString CFileUtils::stripFileFromPath(const QString &path)
{
if (path.endsWith('/')) { return path; }
@@ -126,6 +131,11 @@ namespace BlackMisc
return CFileUtils::appendFilePaths(CFileUtils::appendFilePaths(path1, path2), path3);
}
QString CFileUtils::appendFilePathsAndFixUnc(const QString &path1, const QString &path2, const QString &path3)
{
return CFileUtils::fixWindowsUncPath(CFileUtils::appendFilePaths(CFileUtils::appendFilePaths(path1, path2), path3));
}
bool CFileUtils::copyRecursively(const QString &sourceDir, const QString &destinationDir)
{
QFileInfo sourceFileInfo(sourceDir);