[SOLVED]how to check whether a Dir is empty or not?
General and Desktop
5
Posts
2
Posters
1.6k
Views
1
Watching
-
wrote on 31 Aug 2015, 08:02 last edited by opengpu2 9 Jan 2015, 05:23
how to check whether a Dir is empty or not?
thank you -
QDir("/PATH/TO/DIR").count()
Returns 2 for empty directories ("." and ".." are counted). -
I tested on Linux and Windows: it returns 2 for empty directories. Since MacOS X is a UNIX like system it behaves same there for sure.
-
I tested on Linux and Windows: it returns 2 for empty directories. Since MacOS X is a UNIX like system it behaves same there for sure.
1/5