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

9 lines
163 B
Mathematica
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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;