diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfile.cpp | 12 | ||||
-rw-r--r-- | src/corelib/io/qfiledevice.cpp | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 6fe4c2455b..d3411abf10 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -206,6 +206,13 @@ QAbstractFileEngine *QFilePrivate::engine() const directory usually is not writable, but it is still possible to create files in it. + Qt's understanding of file permissions is limited, which affects especially + the \l QFile::setPermissions() function. On Windows, Qt will set only the + legacy read-only flag, and that only when none of the Write* flags are + passed. Qt does not manipulate access control lists (ACLs), which makes this + function mostly useless for NTFS volumes. It may still be of use for USB + sticks that use VFAT file systems. POSIX ACLs are not manipulated, either. + \sa QTextStream, QDataStream, QFileInfo, QDir, {The Qt Resource System} */ @@ -1063,9 +1070,12 @@ QFile::permissions(const QString &fileName) /*! Sets the permissions for the file to the \a permissions specified. - Returns \c true if successful, or false if the permissions cannot be + Returns \c true if successful, or \c false if the permissions cannot be modified. + \warning This function does not manipulate ACLs, which may limit its + effectiveness. + \sa permissions(), setFileName() */ diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp index 8d1c59e159..598347a56f 100644 --- a/src/corelib/io/qfiledevice.cpp +++ b/src/corelib/io/qfiledevice.cpp @@ -648,9 +648,12 @@ QFile::Permissions QFileDevice::permissions() const /*! Sets the permissions for the file to the \a permissions specified. - Returns \c true if successful, or false if the permissions cannot be + Returns \c true if successful, or \c false if the permissions cannot be modified. + \warning This function does not manipulate ACLs, which may limit its + effectiveness. + \sa permissions() */ bool QFileDevice::setPermissions(Permissions permissions) |