2011-05-24 12 views

Respuesta

26

Te refieres a la methods in the documentation?

File file = new File("./target/test.txt"); 
String dirPath = file.getAbsoluteFile().getParentFile().getAbsolutePath() 
assert dirPath.equals("/home/me/dev/target"); 
2
assert file.getParentFile().getAbsolutePath().equals("/home/me/dev/target"); 
Cuestiones relacionadas