Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Globbing for Empty Directories?



On Sunday, March 28, 2004, at 03:55 PM, Bart Schaefer wrote:

On Mar 28,  3:13pm, Aaron Davies wrote:
} Subject: Re: Globbing for Empty Directories?
}
} On Sunday, March 28, 2004, at 02:21 PM, Bart Schaefer wrote:
}
} > It's not possible to tell if a directory is empty without actually
} > looking for files in it.
}
} Thanks much. In that case, could I make this a feature request?

What I meant was, the filesystem typically doesn't provide any way to
discover whether a directory is empty without looking for files in it.

So even if zsh implemented an "empty directory" globbing flag internally,
it'd be doing effectively the same thing as the function I showed.  And
that must be what "find ... -empty" is doing as well.

Alright then. It'd still be a nice thing to have in zsh. Is it a policy that globbing be limited to things the filesystem can tell you directly?
--
    __                        __
   /  )                      /  )
  /--/ __.  __  ________    /  / __. , __o  _  _
 /  (_(_/|_/ (_(_) / / <_  /__/_(_/|_\/ <__</_/_)_



Messages sorted by: Reverse Date, Date, Thread, Author