RosettaCodeData/Task/Empty-directory/MATLAB/empty-directory.m

9 lines
163 B
Mathematica
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
function x = isEmptyDirectory(p)
if isdir(p)
f = dir(p)
x = length(f)>2;
else
error('Error: %s is not a directory');
end;
end;