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

Brian Burkhalter bpb at openjdk.org
Wed Oct 18 15:05:59 UTC 2023


On Wed, 18 Oct 2023 14:21:32 GMT, Roger Riggs <rriggs 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.

Some time back I thought of but never proposed a method similar to `withExtension(String)` called `modifyExtension(String parameter)` with behavior

| path    | gus     | ""   | null |
|---------|---------|------|------|
| foo.bar | foo.gus | foo. | foo  |
| foo.    | foo.gus | foo. | foo  |
| foo     | foo.gus | foo. | foo  |

where the 1st column is the path and the 2nd-4th columns are the parameter.

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

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


More information about the nio-dev mailing list