forked from qt-creator/qt-creator
filesystem: Add QFSEngine for filepaths
Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -78,6 +78,7 @@ public:
|
||||
|
||||
QString toUserOutput() const;
|
||||
QString toString() const;
|
||||
QString toFSPathString() const;
|
||||
QVariant toVariant() const;
|
||||
QUrl toUrl() const;
|
||||
|
||||
@@ -210,6 +211,16 @@ public:
|
||||
[[nodiscard]] FilePath absolutePath() const; // Avoid. Use resolvePath(...)[.parent()] with proper base.
|
||||
[[nodiscard]] FilePath absoluteFilePath() const; // Avoid. Use resolvePath(...) with proper base.
|
||||
|
||||
enum class SpecialPathComponent {
|
||||
RootName,
|
||||
RootPath,
|
||||
DeviceRootName,
|
||||
DeviceRootPath,
|
||||
};
|
||||
|
||||
[[nodiscard]] static QString specialPath(SpecialPathComponent component);
|
||||
[[nodiscard]] static FilePath specialFilePath(SpecialPathComponent component);
|
||||
|
||||
private:
|
||||
friend class ::tst_fileutils;
|
||||
static QString calcRelativePath(const QString &absolutePath, const QString &absoluteAnchorPath);
|
||||
|
||||
Reference in New Issue
Block a user