Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QNtfsPermissionCheckGuard Class Reference

The QNtfsPermissionCheckGuard class is a RAII class to manage NTFS permission checking. More...

+ Collaboration diagram for QNtfsPermissionCheckGuard:

Related Symbols

(Note that these are not member symbols.)

bool qEnableNtfsPermissionChecks ()
 
bool qDisableNtfsPermissionChecks ()
 
bool qAreNtfsPermissionChecksEnabled ()
 

Detailed Description

The QNtfsPermissionCheckGuard class is a RAII class to manage NTFS permission checking.

Since
6.6 \inmodule QtCore

For performance reasons, QFile, QFileInfo, and related classes do not perform full ownership and permission (ACL) checking on NTFS file systems by default. During the lifetime of any instance of this class, that default is overridden and advanced checking is performed. This provides a safe and easy way to manage enabling and disabling this change to the default behavior.

Example:

{
QNtfsPermissionCheckGuard permissionGuard; // check is enabled
// do complex things here that need permission check enabled
} // as the guard goes out of scope the check is disabled

This class is available only on Windows.

Friends And Related Symbol Documentation

◆ qAreNtfsPermissionChecksEnabled()

bool qAreNtfsPermissionChecksEnabled ( )
related
Since
6.6 \threadsafe

Checks the status of the permission checks on NTFS file systems. Returns true if the check is enabled.

This function is only available on Windows and makes the direct manipulation of \l qt_ntfs_permission_lookup obsolete.

Note
The thread-safety of this function holds only as long as there are no concurrent updates to \l qt_ntfs_permission_lookup.

◆ qDisableNtfsPermissionChecks()

bool qDisableNtfsPermissionChecks ( )
related
Since
6.6 \threadsafe

Disables permission checking on NTFS file systems. Returns true if the check is disabled, meaning that there are no more users.

This function is only available on Windows and makes the direct manipulation of \l qt_ntfs_permission_lookup obsolete.

This is a low-level function and must (only) be called to match one earlier call to qEnableNtfsPermissionChecks(). Please consider the RAII class \l QNtfsPermissionCheckGuard instead.

Note
The thread-safety of this function holds only as long as there are no concurrent updates to \l qt_ntfs_permission_lookup.

◆ qEnableNtfsPermissionChecks()

bool qEnableNtfsPermissionChecks ( )
related
Since
6.6 \threadsafe

Enables permission checking on NTFS file systems. Returns true if the check was already enabled before the call to this function, meaning that there are other users.

This function is only available on Windows and makes the direct manipulation of \l qt_ntfs_permission_lookup obsolete.

This is a low-level function, please consider the RAII class \l QNtfsPermissionCheckGuard instead.

Note
The thread-safety of this function holds only as long as there are no concurrent updates to \l qt_ntfs_permission_lookup.

The documentation for this class was generated from the following file: