Java Path File Extention nio getFileExtension(Path path)

Here you can find the source of getFileExtension(Path path)

Description

get File Extension

License

Open Source License

Declaration

public static String getFileExtension(Path path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.file.Path;

public class Main {
    public static String getFileExtension(Path path) {
        String fname = path.getFileName().toString();
        return fname.substring(fname.lastIndexOf('.') + 1);
    }// w  w w.jav a  2s  .  c o m
}

Related

  1. getFileExtension(Path file)
  2. getFileextension(Path path)
  3. getFileExtension(Path path)
  4. getFileExtension(Path path)
  5. getFileExtension(Path path)
  6. getFileNameNoExtensionFromPath(String modulePath)
  7. getFilenameWithoutExtension(Path file)
  8. getFileNameWithoutExtension(Path path)
  9. getFileNameWithoutExtension(Path path)