Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[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 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