diff options
author | hjk <[email protected]> | 2022-10-10 17:32:56 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2022-10-13 10:38:35 +0000 |
commit | 1fa32552425f0c3fd98ae20bfd26b8b85bfda3e0 (patch) | |
tree | a41b22ee65643fdb166e5ee4f4f79da658bd8f73 /src/plugins/docker/dockerdevice.h | |
parent | e0832ce7fca490ec1656933ce5bedb6d6da969cd (diff) |
Utils: Split off file access interface from IDevice
The file accessing functions form now a class hierarchy by themselves,
the devices return a suitable point.
The previous implementation was mildly confusing by the special handling
of the DesktopDevice, fallbacks and remote cases in the same function
leading to unnecessary boilerplate when adding new functions and
codepaths that sometimes passed the FilePath API twice.
Implemented are a "DesktopDeviceFileAccess" taking care of the
previous !needsDevice() branches and a "UnixDeviceFileAccess"
covering the current docker and RL uses.
As a side-effect this unifies to a large degree the current docker
and RL code paths with were occasionally deviating from each other
while they shouldn't.
Change-Id: I4ff59d4be2a07d13e2ca5e9ace26a84160a87c9d
Reviewed-by: Jarek Kobus <[email protected]>
Diffstat (limited to 'src/plugins/docker/dockerdevice.h')
-rw-r--r-- | src/plugins/docker/dockerdevice.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index 1382dc7d7b6..625b45b46ff 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -84,37 +84,6 @@ public: Utils::FilePath rootPath() const override; bool handlesFile(const Utils::FilePath &filePath) const override; - bool isExecutableFile(const Utils::FilePath &filePath) const override; - bool isReadableFile(const Utils::FilePath &filePath) const override; - bool isWritableFile(const Utils::FilePath &filePath) const override; - bool isReadableDirectory(const Utils::FilePath &filePath) const override; - bool isWritableDirectory(const Utils::FilePath &filePath) const override; - bool isFile(const Utils::FilePath &filePath) const override; - bool isDirectory(const Utils::FilePath &filePath) const override; - bool createDirectory(const Utils::FilePath &filePath) const override; - bool exists(const Utils::FilePath &filePath) const override; - bool ensureExistingFile(const Utils::FilePath &filePath) const override; - bool removeFile(const Utils::FilePath &filePath) const override; - bool removeRecursively(const Utils::FilePath &filePath) const override; - bool copyFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const override; - bool renameFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const override; - Utils::FilePath symLinkTarget(const Utils::FilePath &filePath) const override; - void iterateDirectory( - const Utils::FilePath &filePath, - const Utils::FilePath::IterateDirCallback &callBack, - const Utils::FileFilter &filter) const override; - std::optional<QByteArray> fileContents(const Utils::FilePath &filePath, - qint64 limit, - qint64 offset) const override; - bool writeFileContents(const Utils::FilePath &filePath, - const QByteArray &data, - qint64 offset) const override; - Utils::FilePathInfo filePathInfo(const Utils::FilePath &filePath) const override; - QDateTime lastModified(const Utils::FilePath &filePath) const override; - qint64 fileSize(const Utils::FilePath &filePath) const override; - QFileDevice::Permissions permissions(const Utils::FilePath &filePath) const override; - bool setPermissions(const Utils::FilePath &filePath, - QFileDevice::Permissions permissions) const override; bool ensureReachable(const Utils::FilePath &other) const override; Utils::Environment systemEnvironment() const override; |