[erlang-questions] How to identify symlinks with Erlang

Jordan Wilberding diginux@REDACTED
Sun Apr 1 01:48:32 CEST 2007


I ended up finding a solution. I wrote my own function, but instead of 
using file:read_file_info, I used file:read_link_info which correctly 
identifies symlink types along with files and directories.

Thanks!
Jordan Wilberding

Jordan Wilberding wrote:
> Hello,
>
> I was wondering if there is a way to identify if a directory is a 
> symlink to another directory in Erlang?
>
> The problem I am having is that when you install the wine, it creates 
> symlinks like
>
> ~/.wine/dosdevices/z: -> /
>
> This means when you try to use filelib:fold_files("~/.",..) it goes 
> endlessly, since it keeps recursing back into the symlink.
>
> Anyone have any ideas?
>
> Thanks!
> Jordan Wilberding
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>   




More information about the erlang-questions mailing list