FileGuardLocker Class

class QInstaller::FileGuardLocker

The FileGuardLocker class locks a file path and releases it on destruction. More...

Header: #include <FileGuardLocker>

Public Functions

FileGuardLocker(const QString &path, QInstaller::FileGuard *guard)
~FileGuardLocker()

Detailed Description

A convenience class for locking a file path using the resource acquisition is initialization (RAII) programming idiom.

Member Function Documentation

[explicit] FileGuardLocker::FileGuardLocker(const QString &path, QInstaller::FileGuard *guard)

Constructs the object and attempts to lock path with guard. If the lock is already held by another thread, this method will wait for it to become available.

[noexcept] FileGuardLocker::~FileGuardLocker()

Destructs the object and unlocks the locked file path.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.