FileGuard Class

class QInstaller::FileGuard

The FileGuard class provides basic access serialization for file paths. More...

Header: #include <FileGuard>

Public Functions

void release(const QString &path)
bool tryLock(const QString &path)

Static Public Members

QInstaller::FileGuard *globalObject()

Detailed Description

This class keeps a list of file paths that are locked from mutual access. Attempting to lock them from another thread will fail until the the locked path name is released.

Member Function Documentation

[static] QInstaller::FileGuard *FileGuard::globalObject()

Returns the application global instance.

void FileGuard::release(const QString &path)

Unlocks path.

bool FileGuard::tryLock(const QString &path)

Attempts to lock path. Returns true if the lock could be acquired, false if another thread has already locked the 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.