Here you can find the source of GetPathName(String path)
public static String GetPathName(String path)
//package com.java2s; //License from project: Apache License import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static String GetPathName(String path) { return Path2UnixStr(Paths.get(path).getFileName()); }/* w w w . jav a 2 s.c o m*/ public static String Path2UnixStr(Path path) { return path.toString().replace("\\", "/"); } }