file:list_dir/1 cannot lists dot(.) and dot-dot(..) directories

Yao Bao <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Hello,

I'm trying to list all files in a directory, then I found file:list_dir/1, it works fine but dot(.) and dot-dot(..) is missing.

I would expect the result from file:list_dir/1 in Erlang is the same as readdir(dirp) in C.

Is there any (historical) reason why these two special directories missing from the return?

Cheers,
Yao
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.