Doc: QFileDevice and QFile::setPermissions do not manipulate ACLs
Task-number: QTBUG-41271 Change-Id: Id97add8a6fdb7ce59020e833f6dc11744c9aaa7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
c4430ed023
commit
88e7a4f661
@ -206,6 +206,13 @@ QAbstractFileEngine *QFilePrivate::engine() const
|
|||||||
directory usually is not writable, but it is still possible to
|
directory usually is not writable, but it is still possible to
|
||||||
create files in it.
|
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}
|
\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.
|
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.
|
modified.
|
||||||
|
|
||||||
|
\warning This function does not manipulate ACLs, which may limit its
|
||||||
|
effectiveness.
|
||||||
|
|
||||||
\sa permissions(), setFileName()
|
\sa permissions(), setFileName()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -648,9 +648,12 @@ QFile::Permissions QFileDevice::permissions() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the permissions for the file to the \a permissions specified.
|
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.
|
modified.
|
||||||
|
|
||||||
|
\warning This function does not manipulate ACLs, which may limit its
|
||||||
|
effectiveness.
|
||||||
|
|
||||||
\sa permissions()
|
\sa permissions()
|
||||||
*/
|
*/
|
||||||
bool QFileDevice::setPermissions(Permissions permissions)
|
bool QFileDevice::setPermissions(Permissions permissions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user