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

Dmitrii Dimandt dmitriid@REDACTED
Thu Jan 24 16:27:22 CET 2013


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? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130124/557c39d5/attachment.htm>


More information about the erlang-questions mailing list