forked from qt-creator/qt-creator
Utils: Implement FilePath::writeFileContents()
Including a docker version of it. Change-Id: Ib2ac6073cc2b39818fb77a7d9d608386f9d17285 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -881,6 +881,17 @@ QByteArray DockerDevice::fileContents(const FilePath &filePath, int limit) const
|
||||
return {};
|
||||
}
|
||||
|
||||
bool DockerDevice::writeFileContents(const Utils::FilePath &filePath, const QByteArray &data) const
|
||||
{
|
||||
QTC_ASSERT(handlesFile(filePath), return {});
|
||||
tryCreateLocalFileAccess();
|
||||
if (hasLocalFileAccess())
|
||||
return mapToLocalAccess(filePath).writeFileContents(data);
|
||||
|
||||
QTC_CHECK(false); // FIXME: Implement
|
||||
return {};
|
||||
}
|
||||
|
||||
void DockerDevice::runProcess(QtcProcess &process) const
|
||||
{
|
||||
const FilePath workingDir = process.workingDirectory();
|
||||
|
||||
Reference in New Issue
Block a user