aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/devicefileaccess.h
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Make FilePath::refersToExe(...) return the found itemhjk2022-11-281-2/+2
| | | | | | | ... and use in on the CMake side. Change-Id: Ib215ebc4f87beb67b6a302d0c42e7b955a2fa5b7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Utils: Introduce a FilePath::refersToExecutableFilehjk2022-11-221-0/+8
| | | | | | | | | ... to avoid the need in user code to care for .exe and .bat suffixes. Change-Id: Ic249f14273f72c663912482555f98be1af923823 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Sanitize FilePath::onDevice()hjk2022-11-171-1/+1
| | | | | | | It's one entry in the FilePath world, so it should start with a QString. Change-Id: Ib2693f52d56103a4c37ba7361b191c2a5c2a72f8 Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Fix iterateWithFindMarcus Tillmanns2022-10-141-8/+3
| | | | | | | | | | | | The change of runInShell to take QString + QStringList meant that the caller was no longer able to fine tune the argument escaping. This lead to "find -exec ... \;" being escaped incorrectly. Changing back to CommandLine fixes this. Change-Id: I55b09bd745c09912a2a0b4e43432824a99c0dd4e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Utils: Add FilePath::isSymLinkhjk2022-10-141-0/+3
| | | | | | | | Needed to fix GenericUploadStep handle the device->device case. Change-Id: I551ac0957879e5b8737c22fa823d8b2e6bec0b5e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Utils: Add FilePath::isSameFile()Marcus Tillmanns2022-10-131-0/+3
| | | | | | | | | FilePath::isSameFile() checks if two files are the same file. It first checks if its on the same device. If it is, it will try to read the fileId of the files and compare them. Change-Id: I83668955cacd4e5ed03d43a3fee2be29e9d0a6f0 Reviewed-by: hjk <hjk@qt.io>
* Utils: Split off file access interface from IDevicehjk2022-10-131-0/+194
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 <jaroslaw.kobus@qt.io>