import java.io.File;

File theFile = new File("/tmp/text1.txt");
println("Dirname: " + theFile.getParent());
println("Basename: " + theFile.getName());

============== Output ==============
Dirname: /tmp
Basename: text1.txt

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()