Results 1 to 3 of 3
- 10-01-2011, 07: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, 08: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, 02:54 AM #3Senior Member
- Join Date
- Mar 2011
- Rep Power
- By madroadbiker in forum New To JavaReplies: 3Last Post: 04-23-2011, 04:51 PM
- By PhHein in forum Suggestions & FeedbackReplies: 3Last Post: 07-08-2010, 05:16 PM
- By Andy09 in forum Advanced JavaReplies: 1Last Post: 09-10-2009, 01:58 PM
- By xcallmejudasx in forum Forum LobbyReplies: 1Last Post: 06-05-2009, 11:26 PM
- By ryn21 in forum New To JavaReplies: 4Last Post: 10-10-2008, 07:47 AM