views:

327

answers:

6

Hi, my application stores infos about some files analyzed in given directory... it produces one file for each file found in a directory, so it could be any number ... I need to store those produced files separately, but it's not the best idea to put them like it is ... so I'm looking for some virtual filesystem, which would allow me to keep ale these files in a single one, yet it must be still as simple to use as "real" filesystem. The performance is also very important ... Any advices here? :)

+2  A: 

Have you considered using a database?

If you don't want the dependancy, I guess you could go with an XML-file or a ClientDataSet.

Yannick M.
+12  A: 

Two words: Structured Storage!

1) It's free.
2) It's part of the Microsoft OS.
3) It's used by many other applications with good results.

Workshop Alex
And it has tons of Delphi object wrappers too ;)
Alexander
Yep, although I've used the raw API in the past, which works great too. But one component set that does contain a free implementations are the Jedi JCL/JVCL components. http://www.delphi-jedi.org/
Workshop Alex
+1  A: 

If you are only using NTFS, you might think about writing that data into alternate data streams. But beware that copying the file to non-NTFS drives or ZIPing them will remove that data. Maybe that's even desired...

dummzeuch
+2  A: 

Create a zip file and store every single file in it.

I recommend the Turbopower Abbrevia (http://sourceforge.net/projects/tpabbrevia/) library of open source components that provide full ZIP functionality.

PA
+3  A: 

Use SQLite, via simple API wraper.

Store files into BLOBs and other info (name, size...) in other fields.

It's simple, you have one file, works fast, and you have advantage of full text indexing and other goodies SQLite has.

dmajkic
it might be great idea! some time ago (a few years I guess) I had a little project with SQLite in Delphi. I'll try implementing it like that right now!:)
migajek
+4  A: 

As stated by the others there are a few different choices.

Here's one I've played with in the past.

GpStructuredStorage is a "Compound file (structured storage, file system inside a file) implementation". BSD Licensed.

This might be what your looking for.

Ryan.

Ryan J. Mills