-d $dir -f $dir -e $dir # or just call stat()