diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-28 13:26:22 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-29 11:15:42 +0000 |
commit | 041df6e2aedcf0d8a305a503045965cc15cec2a2 (patch) | |
tree | 3ce1c6d5b1700f0795fe3785c7b6969ba89931ab /src/corelib/io | |
parent | e81f430e30635f975dd4635ffb64d66fc1bce355 (diff) |
QFileInfo: Clarify documentation on symlinks
Explain symbolic links vs shortcuts.
Change-Id: I12176616be72c97607ee1f441d1ea05af5e9e549
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index e80294fb6c..907574b6dd 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -1056,12 +1056,16 @@ bool QFileInfo::isBundle() const } /*! - Returns \c true if this object points to a symbolic link (or to a - shortcut on Windows); otherwise returns \c false. + Returns \c true if this object points to a symbolic link; + otherwise returns \c false. - On Unix (including \macos and iOS), opening a symlink effectively opens - the \l{symLinkTarget()}{link's target}. On Windows, it opens the \c - .lnk file itself. + Symbolic links exist on Unix (including \macos and iOS) and Windows + and are typically created by the \c{ln -s} or \c{mklink} commands, + respectively. Opening a symbolic link effectively opens + the \l{symLinkTarget()}{link's target}. + + In addition, true will be returned for shortcuts (\c *.lnk files) on + Windows. Opening those will open the \c .lnk file itself. Example: @@ -1116,8 +1120,8 @@ bool QFileInfo::isRoot() const \fn QString QFileInfo::symLinkTarget() const \since 4.2 - Returns the absolute path to the file or directory a symlink (or shortcut - on Windows) points to, or an empty string if the object isn't a symbolic + Returns the absolute path to the file or directory a symbolic link + points to, or an empty string if the object isn't a symbolic link. This name may not represent an existing file; it is only a string. |