summaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-10-20 22:56:26 +0200
committerDaniel Molkentin <daniel.molkentin@nokia.com>2011-10-21 15:59:20 +0200
commit1b9c9f74c78471ec2ab9680d0f480f03332542e0 (patch)
tree6a5299396ef61cfb252791a6c362751ae44aa0c1 /src/libs
parente70e880d8eeed5b25efe8f92ea76c3bf96a8b3a3 (diff)
downloadqt-creator-1b9c9f74c78471ec2ab9680d0f480f03332542e0.tar.gz
move api docs to ... the api
\fn is a fallback for stuff from headers Change-Id: I7c5a187bf2cfae2682fd267f30da479488d2592e Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/utils/fileutils.cpp78
1 files changed, 33 insertions, 45 deletions
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp
index 4821af16ae..9fa83185a7 100644
--- a/src/libs/utils/fileutils.cpp
+++ b/src/libs/utils/fileutils.cpp
@@ -53,57 +53,12 @@ namespace Utils {
*/
/*!
- \fn Utils::FileUtils::removeRecursively(const QString &filePath, QString *error)
-
Removes the directory \a filePath and its subdirectories recursively.
\note The \a error parameter is optional.
\return Whether the operation succeeded.
*/
-
-/*!
- \fn Utils::FileUtils::copyRecursively(const QString &srcFilePath, const QString &tgtFilePath, QString *error)
-
- Copies the directory specified by \a srcFilePath recursively to \a tgtFilePath. \a tgtFilePath will contain
- the target directory, which will be created. Example usage:
-
- \code
- QString error;
- book ok = Utils::FileUtils::copyRecursively("/foo/bar", "/foo/baz", &error);
- if (!ok)
- qDebug() << error;
- \endcode
-
- This will copy the contents of /foo/bar into to the baz directory under /foo, which will be created in the process.
-
- \note The \a error parameter is optional.
-
- \return Whether the operation succeeded.
-*/
-
-/*!
- \fn Utils::FileUtils::isFileNewerThan(const QString &filePath, const QDateTime &timeStamp)
-
- If \a filePath is a directory, the function will recursively check all files and return
- true if one of them is newer than \a timeStamp. If \a filePath is a single file, true will
- be returned if the file is newer than \timeStamp.
-
- \return Whether at least one file in \a filePath has a newer date than \a timeStamp.
-*/
-
-/*!
- \fn Utils::FileUtils::resolveSymlinks(const QString &filePath)
-
- Recursively resolve possibly present symlinks in \a filePath.
- Unlike QFileInfo::canonicalFilePath(), this function will still return the expected target file
- even if the symlink is dangling.
-
- \note Maximum recursion depth == 16.
-
- return Symlink target file path.
-*/
-
bool FileUtils::removeRecursively(const QString &filePath, QString *error)
{
QFileInfo fileInfo(filePath);
@@ -153,6 +108,23 @@ bool FileUtils::removeRecursively(const QString &filePath, QString *error)
return true;
}
+/*!
+ Copies the directory specified by \a srcFilePath recursively to \a tgtFilePath. \a tgtFilePath will contain
+ the target directory, which will be created. Example usage:
+
+ \code
+ QString error;
+ book ok = Utils::FileUtils::copyRecursively("/foo/bar", "/foo/baz", &error);
+ if (!ok)
+ qDebug() << error;
+ \endcode
+
+ This will copy the contents of /foo/bar into to the baz directory under /foo, which will be created in the process.
+
+ \note The \a error parameter is optional.
+
+ \return Whether the operation succeeded.
+*/
bool FileUtils::copyRecursively(const QString &srcFilePath,
const QString &tgtFilePath, QString *error)
{
@@ -190,6 +162,13 @@ bool FileUtils::copyRecursively(const QString &srcFilePath,
return true;
}
+/*!
+ If \a filePath is a directory, the function will recursively check all files and return
+ true if one of them is newer than \a timeStamp. If \a filePath is a single file, true will
+ be returned if the file is newer than \timeStamp.
+
+ \return Whether at least one file in \a filePath has a newer date than \a timeStamp.
+*/
bool FileUtils::isFileNewerThan(const QString &filePath,
const QDateTime &timeStamp)
{
@@ -209,6 +188,15 @@ bool FileUtils::isFileNewerThan(const QString &filePath,
return false;
}
+/*!
+ Recursively resolve possibly present symlinks in \a filePath.
+ Unlike QFileInfo::canonicalFilePath(), this function will still return the expected target file
+ even if the symlink is dangling.
+
+ \note Maximum recursion depth == 16.
+
+ return Symlink target file path.
+*/
QString FileUtils::resolveSymlinks(const QString &path)
{
QFileInfo f(path);