diff options
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r-- | src/corelib/io/qfile.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 6dc7e05eb5..3bf6ddbc41 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -229,6 +229,8 @@ QAbstractFileEngine *QFilePrivate::engine() const 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. + \include android-content-uri-limitations.qdocinc + \sa QTextStream, QDataStream, QFileInfo, QDir, {The Qt Resource System} */ @@ -829,13 +831,9 @@ QFile::link(const QString &fileName, const QString &linkName) } /*! - Copies the file currently specified by fileName() to a file called - \a newName. Returns \c true if successful; otherwise returns \c false. - - Note that if a file with the name \a newName already exists, - copy() returns \c false (i.e. QFile will not overwrite it). + Copies the file named fileName() to \a newName. - The source file is closed before it is copied. + \include qfile-copy.qdocinc \sa setFileName() */ @@ -910,7 +908,7 @@ QFile::copy(const QString &newName) if (!error) { // Sync to disk if possible. Ignore errors (e.g. not supported). - d->fileEngine->syncToDisk(); + out.d_func()->fileEngine->syncToDisk(); if (!out.rename(newName)) { error = true; @@ -941,11 +939,9 @@ QFile::copy(const QString &newName) /*! \overload - Copies the file \a fileName to \a newName. Returns \c true if successful; - otherwise returns \c false. + Copies the file named \a fileName to \a newName. - If a file with the name \a newName already exists, copy() returns \c false - (i.e., QFile will not overwrite it). + \include qfile-copy.qdocinc \sa rename() */ @@ -967,6 +963,9 @@ QFile::copy(const QString &fileName, const QString &newName) \note In \l{QIODevice::}{WriteOnly} or \l{QIODevice::}{ReadWrite} mode, if the relevant file does not already exist, this function will try to create a new file before opening it. + On Android, it's expected to have access permission to the parent + of the file name, otherwise, it won't be possible to create this + non-existing file. \sa QIODevice::OpenMode, setFileName() */ |