• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading files/directories in Chronological order.

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can any one suggest me how to read files/directories in chronological order? What I want is I want to read all the directories but the order should the latest file/folder should come first.



 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about a combination of File.listFiles(), Arrays.sort and a custom Comparator?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!