CQtDeployer/Deploy/pathutils.h

75 lines
1.7 KiB
C
Raw Normal View History

//#
//# Copyright (C) 2018-2019 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include <QString>
2019-09-29 20:12:16 +03:00
#include "deploy_global.h"
#ifndef PATHUTILS_H
#define PATHUTILS_H
/**
* @brief The PathUtils class
*
*/
2019-09-29 20:12:16 +03:00
class DEPLOYSHARED_EXPORT PathUtils
{
public:
PathUtils();
2019-10-16 18:07:36 +03:00
/**
* @brief toFullPath remove all dublicate separators and insert separators into begin and end
* @param path
* @return return full path
*/
static QString toFullPath(QString path);
2019-10-16 18:07:36 +03:00
/**
* @brief getReleativePath
* @param path
* @return return releative path from "path" to root dir
*/
static QString getReleativePath(QString path);
2019-10-16 18:07:36 +03:00
/**
* @brief stripPath remove all dublicate separators and remove separators from begin and end
* @param path
* @return return strip patth
*/
static QString stripPath(QString path);
/**
* @brief getRelativeLink return releative path
* @param from
* @param to
* @return releative path
*/
static QString getRelativeLink(QString from, QString to);
2019-10-16 18:07:36 +03:00
/**
* @brief isPath
* @param path
* @return return true if imput value is path
*/
static bool isPath(const QString &path);
2019-10-16 18:07:36 +03:00
/**
* @brief getDrive
* @param path
* @return char of drive in windows systems
*/
static QChar getDrive(QString path);
/**
* @brief isAbsalutPath
* @param path
* @return return true if path is absolute
*/
static bool isAbsalutPath(const QString &path);
};
#endif // PATHUTILS_H