![]() |
Qt 6.x
The Qt SDK
|
#include "qfilesystemengine_p.h"#include "qoperatingsystemversion.h"#include "qplatformdefs.h"#include "qsysinfo.h"#include "qscopeguard.h"#include "private/qabstractfileengine_p.h"#include "private/qfiledevice_p.h"#include "private/qfsfileengine_p.h"#include <private/qsystemlibrary_p.h>#include <qdebug.h>#include "qdir.h"#include "qdatetime.h"#include "qfile.h"#include "qvarlengtharray.h"#include "qt_windows.h"#include "qstring.h"#include <sys/types.h>#include <direct.h>#include <winioctl.h>#include <objbase.h>#include <shlobj.h>#include <shobjidl.h>#include <shellapi.h>#include <lm.h>#include <accctrl.h>#include <initguid.h>#include <ctype.h>#include <limits.h>#include <security.h>#include <QtCore/private/qfunctions_win_p.h>
Include dependency graph for qfilesystemengine_win.cpp:Go to the source code of this file.
Classes | |
| struct | _REPARSE_DATA_BUFFER |
| class | FileOperationProgressSink |
Macros | |
| #define | SECURITY_WIN32 |
| #define | SPI_GETPLATFORMTYPE 257 |
| #define | PATH_MAX FILENAME_MAX |
| #define | _INTPTR_T_DEFINED |
| #define | INVALID_FILE_ATTRIBUTES (DWORD (-1)) |
| #define | REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer) |
| #define | MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384 |
| #define | IO_REPARSE_TAG_SYMLINK (0xA000000CL) |
| #define | FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Typedefs | |
| typedef INT_PTR | intptr_t |
| typedef struct _REPARSE_DATA_BUFFER | REPARSE_DATA_BUFFER |
| typedef struct _REPARSE_DATA_BUFFER * | PREPARSE_DATA_BUFFER |
Functions | |
| QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED bool | qEnableNtfsPermissionChecks () noexcept |
| bool | qDisableNtfsPermissionChecks () noexcept |
| bool | qAreNtfsPermissionChecksEnabled () noexcept |
| [raii] | |
| static bool | toFileTime (const QDateTime &date, FILETIME *fileTime) |
| static QString | readSymLink (const QFileSystemEntry &link) |
| static QString | readLink (const QFileSystemEntry &link) |
| static bool | uncShareExists (const QString &server) |
| static bool | getFindData (QString path, WIN32_FIND_DATA &findData) |
| static QByteArray | fileId (HANDLE handle) |
| QByteArray | fileIdWin8 (HANDLE handle) |
| static bool | tryDriveUNCFallback (const QFileSystemEntry &fname, QFileSystemMetaData &data) |
| static bool | tryFindFallback (const QFileSystemEntry &fname, QFileSystemMetaData &data) |
| static bool | mkDir (const QString &path, SECURITY_ATTRIBUTES *securityAttributes, DWORD *lastError=nullptr) |
| static bool | rmDir (const QString &path) |
| static bool | createDirectoryWithParents (const QString &nativeName, SECURITY_ATTRIBUTES *securityAttributes, bool shouldMkdirFirst=true) |
| static QDateTime | fileTimeToQDateTime (const FILETIME *time) |
Variables | |
| static QBasicAtomicInt | qt_ntfs_permission_lookup_v2 = Q_BASIC_ATOMIC_INITIALIZER(0) |
| #define _INTPTR_T_DEFINED |
Definition at line 60 of file qfilesystemengine_win.cpp.
| #define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Definition at line 103 of file qfilesystemengine_win.cpp.
| #define INVALID_FILE_ATTRIBUTES (DWORD (-1)) |
Definition at line 64 of file qfilesystemengine_win.cpp.
| #define IO_REPARSE_TAG_SYMLINK (0xA000000CL) |
Definition at line 100 of file qfilesystemengine_win.cpp.
| #define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384 |
Definition at line 97 of file qfilesystemengine_win.cpp.
| #define PATH_MAX FILENAME_MAX |
Definition at line 47 of file qfilesystemengine_win.cpp.
| #define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer) |
Definition at line 93 of file qfilesystemengine_win.cpp.
| #define SECURITY_WIN32 |
Definition at line 37 of file qfilesystemengine_win.cpp.
| #define SPI_GETPLATFORMTYPE 257 |
Definition at line 43 of file qfilesystemengine_win.cpp.
| typedef INT_PTR intptr_t |
Definition at line 57 of file qfilesystemengine_win.cpp.
| typedef struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER |
| typedef struct _REPARSE_DATA_BUFFER REPARSE_DATA_BUFFER |
|
static |
Definition at line 1505 of file qfilesystemengine_win.cpp.
References QString::at(), QString::count(), createDirectoryWithParents(), QString::lastIndexOf(), QString::left(), mkDir(), QDir::separator(), QString::size(), and QString::startsWith().
Referenced by createDirectoryWithParents().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1024 of file qfilesystemengine_win.cpp.
References info, and qsnprintf().
Referenced by fileIdWin8(), QSSGMesh::MeshInternal::MultiMeshInfo::isValid(), QSSGMesh::MeshInternal::MeshDataHeader::isValid(), QQsbCollection::readEndHeader(), and QFile::rename().
Here is the call graph for this function:
Here is the caller graph for this function:| QByteArray fileIdWin8 | ( | HANDLE | handle | ) |
Definition at line 1039 of file qfilesystemengine_win.cpp.
References fileId(), QByteArray::number(), and QByteArray::toHex().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 1868 of file qfilesystemengine_win.cpp.
References time, and QTimeZone::UTC.
Referenced by QFileSystemMetaData::accessTime(), QFileSystemMetaData::birthTime(), QFileSystemMetaData::metadataChangeTime(), and QFileSystemMetaData::modificationTime().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 765 of file qfilesystemengine_win.cpp.
Referenced by tryFindFallback().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1458 of file qfilesystemengine_win.cpp.
References QString::utf16().
Referenced by createDirectoryWithParents().
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
[raii]
Returns true if the check is enabled.
Definition at line 425 of file qfilesystemengine_win.cpp.
References QBasicAtomicInteger< T >::loadRelaxed(), QT_IF_DEPRECATED_SINCE, qt_ntfs_permission_lookup, and qt_ntfs_permission_lookup_v2.
Here is the call graph for this function:
|
noexcept |
Returns true if the check is disabled, i.e. there are no more users.
Definition at line 412 of file qfilesystemengine_win.cpp.
References QBasicAtomicInteger< T >::fetchAndSubRelaxed(), QT_IF_DEPRECATED_SINCE, qt_ntfs_permission_lookup, and qt_ntfs_permission_lookup_v2.
Here is the call graph for this function:
|
noexcept |
Returns true if the check was previously enabled.
Definition at line 399 of file qfilesystemengine_win.cpp.
References QBasicAtomicInteger< T >::fetchAndAddRelaxed(), QT_IF_DEPRECATED_SINCE, qt_ntfs_permission_lookup, and qt_ntfs_permission_lookup_v2.
Here is the call graph for this function:
|
static |
Definition at line 714 of file qfilesystemengine_win.cpp.
References QString::fromWCharArray(), MAX_PATH, QFileSystemEntry::nativeFilePath(), Q_UNUSED, and ret.
Here is the call graph for this function:
|
static |
Definition at line 662 of file qfilesystemengine_win.cpp.
References QRegularExpression::CaseInsensitiveOption, QString::fromWCharArray(), FSCTL_GET_REPARSE_POINT, IO_REPARSE_TAG_SYMLINK, QRegularExpression::match(), MAX_PATH, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, _REPARSE_DATA_BUFFER::MountPointReparseBuffer, QFileSystemEntry::nativeFilePath(), _REPARSE_DATA_BUFFER::PathBuffer, Q_ASSERT, Q_CHECK_PTR(), _REPARSE_DATA_BUFFER::ReparseTag, QString::replace(), _REPARSE_DATA_BUFFER::SubstituteNameLength, _REPARSE_DATA_BUFFER::SubstituteNameOffset, _REPARSE_DATA_BUFFER::SymbolicLinkReparseBuffer, and QString::utf16().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 1471 of file qfilesystemengine_win.cpp.
|
inlinestatic |
Definition at line 625 of file qfilesystemengine_win.cpp.
References d, date, QDateTime::date(), Qt::LocalTime, and QDateTime::time().
Here is the call graph for this function:
|
static |
Definition at line 1300 of file qfilesystemengine_win.cpp.
References QString::at(), QFileSystemEntry::filePath(), QByteArray::indexOf(), QFileSystemEntry::nativeFilePath(), QChar::toUpper(), uncShareExists(), and QChar::unicode().
Here is the call graph for this function:
|
static |
Definition at line 1352 of file qfilesystemengine_win.cpp.
References getFindData(), INVALID_FILE_ATTRIBUTES, and QFileSystemEntry::nativeFilePath().
Here is the call graph for this function:
|
static |
Definition at line 752 of file qfilesystemengine_win.cpp.
References Qt::CaseInsensitive, server, and Qt::SkipEmptyParts.
Referenced by tryDriveUNCFallback().
Here is the caller graph for this function:
|
static |
Definition at line 388 of file qfilesystemengine_win.cpp.
Referenced by qAreNtfsPermissionChecksEnabled(), qDisableNtfsPermissionChecks(), and qEnableNtfsPermissionChecks().