summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
authorVincent A <vincent@ftopia.com>2012-03-27 23:02:22 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-03 03:40:39 +0200
commit2e7b4bf6739b8b9d803bfb3e96c6d0b4ec26077a (patch)
tree047f80c0c1eac8a74d029aaed865338f11b8f9f4 /src/corelib/io/qdir.cpp
parent314b20e813f7bde7cabce60ed3a0179f5ddfd330 (diff)
Document QFile::rename and QDir::rename's copy operation
Change-Id: Ie81804f77510cfb73917332c8faaf921525fc26e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 1dedc7c5c8..23bf3c5f4b 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1741,11 +1741,16 @@ bool QDir::remove(const QString &fileName)
true if successful; otherwise returns false.
On most file systems, rename() fails only if \a oldName does not
- exist, if \a newName and \a oldName are not on the same
- partition or if a file with the new name already exists.
+ exist, or if a file with the new name already exists.
However, there are also other reasons why rename() can
fail. For example, on at least one file system rename() fails if
\a newName points to an open file.
+
+ If \a oldName is a file (not a directory) that can't be renamed
+ right away, Qt will try to copy \a oldName to \a newName and remove
+ \a oldName.
+
+ \sa QFile::rename()
*/
bool QDir::rename(const QString &oldName, const QString &newName)
{