Here you can find the source of getName(Path path)
@Deprecated public static String getName(Path path)
//package com.java2s; //License from project: Open Source License import java.nio.file.Path; public class Main { @Deprecated public static String getName(Path path) { return getFileName(path); }// w ww . j a v a 2 s. co m public static String getFileName(Path path) { return path.getFileName().toString(); } }