Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

directories/file reading

 
eric clark
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, i just wrote something to read all files in a specific dir.works fine. now i made something where the user can create new sub-dirs in this dir.werks,2.so when i readout the main dir, the reading routine shows me the subdirs as files,2. now i need to differ if its a file or a new dir, and when i click it (the subdir), i need to see the files in the subdir. how can i differ between files and directory names then? plz help, its urgent. thx
eric
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the methods isFile() and isDirectory() of the File class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic