split-path

[procedure] split-path path

MzScheme: decompose pathname and returns three values, base, name and must-be-dir?.

  • base may be:
    • a string pathname
    • 'relative
    • #f (if path is a root dir)
  • name may be:
    • a string dir name
    • a string file name
    • 'up if the last component is up-directory (..)
    • 'same if the last component is same-directory (.)
  • must-be-dir?
    • #t if path explicitly specifies a directory
    • #f otherwise

Chicken has decompose-pathname, which is somewhat similar to this function.