Path as an object in std.path

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jun 7 10:27:16 PDT 2013


On 6/7/13 1:04 PM, monarch_dodra wrote:
> I think using string as the main form of representation for a path is fine.
>
> 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);


Andrei


More information about the Digitalmars-d mailing list