[erlang-questions] The reason for filename:join/1 behaviour?

Max Lapshin max.lapshin@REDACTED
Thu Jan 24 16:50:12 CET 2013


To make it easier to read your /etc/passwd:

filename:join(DocRoot, clean_from_double_dot(UserPath)).


On Thu, Jan 24, 2013 at 7:27 PM, Dmitrii Dimandt <dmitriid@REDACTED> wrote:

> Hi all,
>
> What is the reason behind filename:join/1's behavior? From the docs:
>
> Joins a list of file name Components with directory separators. If one of
> the elements of Components includes an absolute path, for example "/xxx",
> the preceding elements, if any, are removed from the result.
>
> That is,
> > filename:join(["/usr", "/local"]).
> "/local"
> > filename:join(["/usr", "local"]).
> "/usr/local"
>
>
> Why? :)
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130124/7e00eb8e/attachment.htm>


More information about the erlang-questions mailing list