Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Browsing Directory Structure and opening a file in the subdirectory  RSS feed

 
nehal trivedi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my question !
I am browsing thru the Directory structere using a Java program. I can browse, but can't open a file down in the sub-sub folder.
Any ideas, it seems to me that the constructor for the filereader is not supporting this. i might be wrong.
Please help.
Nehal
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nehal,
It would be easier for everyone to help you out if you posted some sample code of what you're trying to accomplish. I haven't had any problems opening files regardless of where they reside, unless the file is currently being locked by some other process.
BTW, remember to put your code between the open and closing UBB code tags.
E.g.

-Peter
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allow me to also suggest the methods "isFile()" and "canRead()" (in class "File") which may also be applicable here.
Hope this helps.
Good Luck,
Avi.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!