Hi Gregg, If you're doing this, won't you also want a function to get the file part too? If so, the 'of' seems better than 'to', it being usable for both...
path-of file file-of file (or perhaps name-of) This would also be useful... ext-of file -- Carl Read. On Monday, 11-October-2010 at 14:29:20 Gregg Irwin wrote, > >After years of using "first split-path file" directly, I'm considering >a shortcut mezzanine. e.g. > > path-of: func [file [file! url!]] [ > first split-path file > ] > >A common use for this is with MAKE-DIR, which I also have a wrapper >for (ENSURE-DIR-EXISTS), when writing files. It's a longer name, but >says what I want. > >The question is what to call it. Do you think PATH-OF is good, like >WORDS-OF and other *-OF reflective funcs, or should it be PATH-TO? Any >other name suggestions? > > make-dir/deep first split-path file > >versus > > ensure-dir-exists path-of file > >or > > ensure-dir-exists path-to file > > >We could also look at whether ENSURE-DIR-EXISTS should just take the >file and split the path for it internally, but I don't like that idea >as I think it assumes too much. > >--Gregg > >-- >To unsubscribe from the list, just send an email to >lists at rebol.com with unsubscribe as the subject. > > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
