[REBOL] [file path split-path] Naming "first split-path"
From: gregg:pointillistic at: 11-Oct-2010 14:29
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
ensure-dir-exists path-of file
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.