比如
File f = new File("C:\\Program Files\\Java\\WORKSPACE\\loc\\config.inc.php");
String str1 = f.getAbsolutePath();
str1就是C:\\Program Files\\Java\\WORKSPACE\\loc\\config.inc.php,但是我想要的path是C:\\Program Files\\Java\\WORKSPACE\\loc。
有 什么好办法么?
比如随便打一个文件,如f,就能找出我想要的path,可以么?先谢谢了!