return of uint QDir::count () const
Suppose i have one folder and inside that another two files are there ..
But when i am using uint QDir::count () const, it gives me 4 instead of 2 . the extra 2 is for “.” and “..” .i dont understand what is this “.” and “..”
4 replies
Did you see the QDir explanation? [qt-project.org]
On the command prompt “.” represents the current (working) directory and “..” the parent directory.
Guess ‘.’ & ‘..’ way go back to MSDOS days – hope this link might be useful MSDOS [teckies.com]
Suppose the directory structure is as follows a->b,c and A->a then in this case if i apply the above function , then “.” represents a since it holds b and c , whereas “..” represents A which holds a . Am i right ????
Yes, those are simply some representations. There are some more explanations on how using and handling of those special cases in Qt docs e.g. relativeFilePath [qt-project.org]
You must log in to post a reply. Not a member yet? Register here!



