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 #3
Senior Member
- Join Date
- Mar 2011
- Posts
- 261
- Rep Power
- 3
Similar Threads
-
Unexpected text returned from getPath()
By madroadbiker in forum New To JavaReplies: 3Last Post: 04-23-2011, 04:51 PM -
Forum broken?
By PhHein in forum Suggestions & FeedbackReplies: 3Last Post: 07-08-2010, 05:16 PM -
Broken pipe exception while feeding a console's inputstream from a non-finished file
By Andy09 in forum Advanced JavaReplies: 1Last Post: 09-10-2009, 01:58 PM -
still broken?
By xcallmejudasx in forum Forum LobbyReplies: 1Last Post: 06-05-2009, 11:26 PM -
compiler broken please help
By ryn21 in forum New To JavaReplies: 4Last Post: 10-10-2008, 07:47 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks