parse

Parse a path into its constituent components.

Note that the provided path is sliced, not duplicated.

parse
(
mstring path
)

Examples

auto p = parse ("/foo/bar/file.ext".dup);
test (p == "/foo/bar/file.ext");
test (p.folder == "/foo/bar/");
test (p.path == "/foo/bar/");
test (p.file == "file.ext");
test (p.name == "file");
test (p.suffix == ".ext");
test (p.ext == "ext");
test (p.isChild == true);
test (p.isEmpty == false);
test (p.isAbsolute == true);

Meta