joinAll function

String joinAll (Iterable<String> parts)

Joins the given path parts into a single path using the current platform's separator. Example:

p.joinAll(['path', 'to', 'foo']); // -> 'path/to/foo'

If any part ends in a path separator, then a redundant separator will not be added:

p.joinAll(['path/', 'to', 'foo']); // -> 'path/to/foo

If a part is an absolute path, then anything before that will be ignored:

p.joinAll(['path', '/to', 'foo']); // -> '/to/foo'

For a fixed number of parts, join is usually terser.

Implementation

String joinAll(Iterable<String> parts) => context.joinAll(parts);