Here you can find the source of getParentPath(String path)
Parameter | Description |
---|---|
path | a parameter |
public static String getParentPath(String path)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static String getParentPath(String path) { String parentPath = null; File file = new File(path); parentPath = file.getParent();//from w ww. j a va 2 s .c om return parentPath; } }