RFR: 8057113: (fs) Path should have a method to obtain the filename extension
Sebastian Stenzel
sebastian.stenzel at gmail.com
Fri Jan 29 21:48:29 UTC 2021
> Am 29.01.2021 um 22:33 schrieb Brian Burkhalter <bpb at openjdk.java.net>:
>
> The behavior of the proposed method for some example cases is as:
>
> . ->
> .. ->
> .a.b -> b
> ...... ->
> .....a -> a
> ....a.b -> b
> ..foo -> foo
> test.rb -> rb
> a/b/d/test.rb -> rb
> .a/b/d/test.rb -> rb
> foo. ->
> test ->
> .profile ->
> .profile.sh -> sh
> ..foo -> foo
> .....foo -> foo
> .vimrc ->
> test. ->
> test.. ->
> test... ->
> image.jpg -> jpg
> music.mp3 -> mp3
> video.mp4 -> mp4
> document.txt -> txt
>
> If the specification can be agreed upon, then a test will be added to this PR and a corresponding CSR will be filed.
I would propose to add two more test cases:
foo.tar.gz → gz
foo.bar. →
More information about the nio-dev
mailing list