in reply to Re^2: How to tell if a Directory is Empty
in thread How to tell if a Directory is Empty
After realizing my mistake in perlbug: seekdir/readdir broken on win32 on 5.008009, 5.012002, 5.014001 with some help, new code
sub dirEmpty { return !! eval { opendir my($d), @_ or die $!; my $file ; $file = readdir $d for 1..3; defined $file; }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to tell if a Directory is Empty
by MarxBro (Initiate) on Feb 20, 2012 at 23:05 UTC | |
by afoken (Chancellor) on Feb 22, 2012 at 18:52 UTC | |
by MarxBro (Initiate) on Feb 27, 2012 at 05:42 UTC |