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

Vimal Kumar vimal7370@REDACTED
Tue Jun 29 08:09:47 CEST 2021


I am not sure if any programming language (let alone Erlang) does that
while listing folder contents. The . and .. are mere references to current
folder and the parent folder by the OS, they does not exist in real if I am
not wrong.


On Tue, 29 Jun 2021, 09:41 Yao Bao, <free7by@REDACTED> wrote:

> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list