diff options
author | Andreas Hartmetz <andreas@ixgreen.de> | 2023-01-19 23:54:03 +0100 |
---|---|---|
committer | Andreas Hartmetz <andreas@ixgreen.de> | 2023-01-31 19:52:40 +0100 |
commit | 25c1eaa9b11653e5b03319fc58529c5107f98813 (patch) | |
tree | 1ab72fd1c98eb141cc941e7a56c6b1e56c50b485 /src/corelib/io | |
parent | 4b4873359d18c769bbcb3396e5e0803fdaceb45d (diff) |
Document the shortcut isFile() for "exists and is a file"
One can figure out that something needs to exist in order to be a
file, I guess, but the documentation carefully avoided mentioning
it. So mention it.
Change-Id: I5094d6cb88ce2e58f48d8978c9b858d19d209f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index da4cf20b0e..49573347ca 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -1008,7 +1008,8 @@ bool QFileInfo::isNativePath() const /*! Returns \c true if this object points to a file or to a symbolic link to a file. Returns \c false if the - object points to something which isn't a file, such as a directory. + object points to something that is not a file (such as a directory) + or that does not exist. If the file is a symlink, this function returns true if the target is a regular file (not the symlink). @@ -1026,7 +1027,9 @@ bool QFileInfo::isFile() const /*! Returns \c true if this object points to a directory or to a symbolic - link to a directory; otherwise returns \c false. + link to a directory. Returns \c false if the + object points to something that is not a directory (such as a file) + or that does not exist. If the file is a symlink, this function returns true if the target is a directory (not the symlink). |