assert(PosixPath("/foo/bar.txt").head2.withoutExtension.equal("bar")); assert(PosixPath("/foo/bar").head2.withoutExtension.equal("bar")); assert(PosixPath("/foo/.bar").head2.withoutExtension.equal(".bar")); assert(PosixPath("/foo/.bar.txt").head2.withoutExtension.equal(".bar"));
extension
Returns the file base name, excluding the extension.