on my linux box, (stat "dirname")[7] == 48 indicates an empty dir
Very unreliable. That depends on the filesystem, on the filesystem options, and on the history of the directory. On my linux box with an old but large ext3 filesystem, most directories report a size of 4096, even freshly created ones. Only directorys that once had several hundred files grow larger, and they keep their larger size even when all files are removed.
Alexander
In reply to Re^2: How to tell if a Directory is Empty
by afoken
in thread How to tell if a Directory is Empty
by ishootperls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |