File_Utilities module

Path

structSource

A path taken apart: its drive, how many slashes open it, whether one closes it, and the names between.

Both / and \ separate names on every target; path_to_string writes the platform's own separator.

Example↗
path := parse_path("/usr/local/bin/");
assert(path.number_of_leading_slashes == 1 && path.trailing_slash);
assert(path.words.count == 3 && path.words[1] == "local");
array_free(path.words);

Fields

header_string: string
number_of_leading_slashes: int
trailing_slash: bool
words: [..] string

See also