Results 1 to 3 of 3
- 10-01-2011, 08:33 PM #1
Is java.io.File.getPath () broken?
It seems like getPath is broken. It does not return the file path(with the file name removed).
File file = new File ("C:\\Program\\hello.txt");
System.out.println (file.getPath ());
And the output will be C:\Program\hello.txt.
The output should be C:\Program.
Is it broken or am I misunderstanding this method?
- 10-01-2011, 09:18 PM #2
Re: Is java.io.File.getPath () broken?
Try some other methods to see what they do. There is probably one that will return what you want.
- 10-02-2011, 03:54 AM #3Senior Member
- Join Date
- Mar 2011
- Rep Power
- By madroadbiker in forum New To JavaReplies: 3Last Post: 04-23-2011, 05:51 PM
- By PhHein in forum Suggestions & FeedbackReplies: 3Last Post: 07-08-2010, 06:16 PM
- By Andy09 in forum Advanced JavaReplies: 1Last Post: 09-10-2009, 02:58 PM
- By xcallmejudasx in forum Forum LobbyReplies: 1Last Post: 06-06-2009, 12:26 AM
- By ryn21 in forum New To JavaReplies: 4Last Post: 10-10-2008, 08:47 AM