I\'d like to check if a Path (introduced in Java 7) ends with a certain extension. I tried the endsWith() method like so:
endsWith()
Path path = Paths.get
There is no way to do this directly on the Path object itself.
There are two options I can see: