Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
def main(p) do
b = File.ls!(p) == []
end
boolean b = p.list().length == 0;
(let ((b (directory p)))
(if (null b) t nil))
$iterator = new FilesystemIterator($p, FilesystemIterator::SKIP_DOTS);
$b = (iterator_count($iterator) === 0);
opendir(my $dh, $p) || die($!);
my $b = scalar(grep { !/^[\.]{1,2}$/ } readdir($dh)) ? 1 : 0;
closedir($dh);
b = Dir.empty?(p)