[erlang-questions] Best way to check if a given directory is empty (or not)?

Alex Grigorovich alex.grigorovich@REDACTED
Tue Mar 13 19:28:49 CET 2012


On Tue, Mar 13, 2012 at 11:01 PM, Taavi Talvik <taavi@REDACTED> wrote:
> On unix systems link_count=2 means, that directory is empty:

Unfortunately, this is not going to work: link count equals 2 for any
directory that does not contain sub-directories. Regular files are not
linked to their containing directory, therefore they do not affect
link count.

-- 
Alex



More information about the erlang-questions mailing list