Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8057113 (fs) Path should have a method to obtain the filename extension
  3. JDK-8297160

Release Note: The new method Path::getExtension returns the file’s extension

XMLWordPrintable

    • generic
    • generic

      Support for obtaining the file extension of a file path's name is added via a new default method `java.nio.file.Path::getExtension`. Some examples:

      | File Name String | Extension |
      |------------------|-----------|
      | "foo.tar.gz" | "gz" |
      | "foo.bar" | "bar" |
      | "foo." | "" |
      | "foo" | `null` |
      | ".bar" | `null` |

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: