extensions

All extensions of the path.

extensions
(
PathType
)
(
auto ref in PathType p
)
if (
isSomePath!PathType
)

Examples

1 assertEmpty(Path().extensions);
2 assertEmpty(Path("").extensions);
3 assertEmpty(Path("/").extensions);
4 assertEmpty(Path("/hello").extensions);
5 assertEmpty(Path("C:/hello/world").extensions);
6 assertEqual(Path("C:/hello/world.exe").extensions, [".exe"]);
7 assertEqual(Path("hello/world.foo.bar.exe").extensions, [".foo", ".bar", ".exe"]);

Meta