Consider the code:
File file = new File("c:\temp\java\testfile");
testfile
is a file, and it may or may not exist.
I want to get the directory c:\temp\java\
using the File
object. How do I go about doing this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…