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>
bb10
Andreas Hartmetz 2023-01-19 23:54:03 +01:00
parent 4b4873359d
commit 25c1eaa9b1
1 changed files with 5 additions and 2 deletions

View File

@ -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).