Here you can find the source of getParentPath(String path)
public static String getParentPath(String path)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static String getParentPath(String path) { return new File(path).getParent(); }/*from w w w .j av a 2 s . c om*/ }