#include#include int main() { QFileInfo fileInfo("path/to/symoblic/link"); if (fileInfo.isSymLink()) { qDebug() << "File is a symbolic link"; } else { qDebug() << "File is not a symbolic link"; } return 0; }
#includeThe QFileInfo class is a part of the QtCore package library in the Qt framework.#include int main() { QFileInfo directoryInfo("path/to/symoblic/link"); if (directoryInfo.isSymLink() && directoryInfo.isDir()) { qDebug() << "Directory is a symbolic link"; } else { qDebug() << "Directory is not a symbolic link"; } return 0; }