• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

which java Collection is suitable to store a big Files(Directory) ?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello People,
I want to compare two Directory, which have a big capacity about 1 GB(until 20 GB) for one Directory, what should i do to make the code effectively ? Should i use Vector or another Java Collection(Set,List,Map,HashMap,etc) to store the Files temporary. The Files come from another network. I need any Hint or Idea, thanks
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're not going to get away with storing the entire content of the directories.
You may be able to get away with storing the file names and maybe a few attributes like file size and last modification date (depending on how many files there are this is likely possible).
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you want to compare directory listings or the entire directory contents as well?

If you want to compare directory listings, I would suggest parse the input into a sorted tree (sort element can be level), and then compare the trees.
 
reply
    Bookmark Topic Watch Topic
  • New Topic