chickadee » files » decompose-directory

decompose-directory DIRECTORYprocedure

Returns 3 values: the base-origin, base-directory, and the directory-elements for the DIRECTORY.

base-origin
a string or #f. The drive, if any.
base-directory
a string or #f. A directory-separator when DIRECTORY is an absolute-pathname.
directory-elements
a list-of string or #f. The non-directory-separator bits.

DIRECTORY is a string.

  • On Windows (decompose-directory "c:foo/bar") => "c:" #f ("foo" "bar")