filesystem: Add QFSEngine for filepaths

Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-05-31 11:16:44 +02:00
parent a5d44fb32b
commit 3462bc67be
87 changed files with 2194 additions and 192 deletions

View File

@@ -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);