It isn't clear to me what you are asking here. Are you saying you might have a situation where you have both a file named "c" in the directory "a/b/" and a subdirectory named "c" in the same directory (i.e. "a/b/c/")? Is that even possible in any OS?

If "c" is a file in "a/b/", then QFileInfo::isDir() will return false, QFileInfo::isFile() will return true, and both QFileInfo::exists() and QFile::exists() will return true.

If "c" is a subdirectory in "a/b/", then QFileInfo::isDir() will return true, QFileInfo::isFile() will return false, and both QFileInfo::exists() and QFile::exists() will return false.

If "c" is a symbolic link to either a file or subdirectory, then the same rules apply as if it were an actual file or directory. Note that the behaviour of QFileInfo::isSymLink() and QFileInfo::isSymbolicLink() is different on Windows.

QFile derives from QFileDevice so it represents only file objects, not directories.