Results 1 to 2 of 2
Thread: cd.. in java
- 12-04-2008, 04:43 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 9
- Rep Power
- 0
cd.. in java
Hi
i want to save the user some typing, allow the user to type “..” to mean that the change directory should go up one level to the parent directory.
for example c:\1\2\3
if i write ..
output : c:\1\2
but my output is c:\
plz help meJava Code:private void detailFile(DataInputStream in, ObjectOutputStream oOut) { try { String fileName = in.readUTF(); File tmp = new File(file, fileName); if (tmp.isFile()) { oOut.writeObject(tmp); } else { oOut.writeObject(null); } fileName = null; tmp = null; } catch (Exception e) { try { oOut.writeObject(null); } catch (Exception e2) { } } }
thanks
- 12-04-2008, 04:48 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
What's the combination of the code you post and the question?


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks