The extension of "hello.foo.bar.exe" is ".exe".
assertEmpty(Path().extension); assertEmpty(Path("").extension); assertEmpty(Path("/").extension); assertEmpty(Path("/hello").extension); assertEmpty(Path("C:/hello/world").extension); assertEqual(Path("C:/hello/world.exe").extension, ".exe"); assertEqual(Path("hello/world.foo.bar.exe").extension, ".exe");
The extension of the path including the leading dot.