Fast test if directory is empty
How about if(length(dir(all.files=TRUE)) ==0)
?
I'm not sure what you qualify as "fast," but if dir
takes a long time, someone is abusing your filesystem :-(.
How about if(length(dir(all.files=TRUE)) ==0)
?
I'm not sure what you qualify as "fast," but if dir
takes a long time, someone is abusing your filesystem :-(.