std.path.buildPath
Ryan Frame via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jun 11 06:21:47 PDT 2017
On Sunday, 4 June 2017 at 18:15:36 UTC, Russel Winder wrote:
> On Sun, 2017-06-04 at 17:56 +0200, Jacob Carlborg via
> Digitalmars-d- learn wrote:
>> On 2017-06-04 07:44, Jesse Phillips wrote:
>>
>> > What is your expected behavior? Throw an exception? You can't
>> > really
>> > append an absolute path to another.
>>
>> Of course you can. I expect buildPath("/foo", "/bar") to
>> result in "/foo/bar". That's how Ruby behaves.
>
> And Python, Groovy, Java, Kotlin, Ceylon, C++, …
Python 3.5.1 on my machine:
>>> os.path.join("/asdf", "/bcd")
'/bcd'
>>> os.path.join("asdf", "/bcd")
'/bcd'
More information about the Digitalmars-d-learn
mailing list