获取全路径中的最长目录 @param file 文件 @return filePath最长目录
(File file)
| 1415 | * @return filePath最长目录 |
| 1416 | */ |
| 1417 | public static String getDirName(File file) { |
| 1418 | if (file == null) { |
| 1419 | return null; |
| 1420 | } |
| 1421 | return getDirName(file.getPath()); |
| 1422 | } |
| 1423 | |
| 1424 | /** |
| 1425 | * 获取全路径中的最长目录 |