Path as an object in std.path

Lars T. Kyllingstad public at kyllingen.net
Sat Jun 8 07:14:32 PDT 2013


On Saturday, 8 June 2013 at 14:08:59 UTC, Lars T. Kyllingstad 
wrote:
> On Friday, 7 June 2013 at 17:27:16 UTC, Andrei Alexandrescu 
> wrote:
>>> However, there are times where it is convenient to be able to 
>>> explode a
>>> path into a structure, where each part is clearly separate 
>>> from the
>>> next.
>>
>> Tuple!(
>>    string, "drive",
>>    string[], "folders",
>>    string, "basename",
>>    string, "extension"
>> )
>> parsePath(string path);
>>
>> string buildPath(string drive, string[] folders, string 
>> basename, string extension);
>
> [...]
>
> But why stop at the parts you have listed there?

The moment I clicked "Send", I realised that offering multiple 
decompositions would prevent recomposition, because you'd have to 
choose which parts to combine.


More information about the Digitalmars-d mailing list