RFR: 8298318: (fs) APIs for handling filename extensions

Brian Burkhalter bpb at openjdk.org
Wed Oct 18 16:44:12 UTC 2023


On Tue, 17 Oct 2023 19:52:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Add to `java.nio.file.Path` a method `getExtension` to retrieve the `Path`'s extension, and companion methods `removeExtension` and `addExtension`.

Part of the point of these methods is to cover the various use cases without ever having to deal directly with a period `"."`.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16226#issuecomment-1768940324


More information about the nio-dev mailing list