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

Alan Bateman alanb at openjdk.org
Thu Nov 2 15:23:03 UTC 2023


On Wed, 18 Oct 2023 16:20:55 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> There are a few builder style APIs for immutable objects that have `withXXX` methods that return an instance with the change requested. A `withExtension(String ext)` could handle the common cases for removing, replacing, and adding an extension.

This looks like a good direction to try out, seems better than cluttering Path with several methods to aid adding or stripping of an extension.

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

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


More information about the nio-dev mailing list