I’m somewhat new to C++, but not programming in general. I want to write my first practice program in C++ as a file indexing program.
It’s seems easy enough scanning directories for names, storing that information, and filtering them depending on what I want to view.
What I’m concerned about is at some point, I want to index a whole drive (I have an extra 1TB drive apart from my OS to store files on). I have about 400,000-500,000 files on there and I was wondering what would be the best way to store this information? I highly doubt keeping all those records in a text file is optimal and would like to think it’s naive.
Is there anything else I should be concerned about?
Thanks.
Isn’t some kind of database the obvious answer?
If you don’t want to hook up to a server, you can try something like SQLite. Alternatively, if you only need to do basic lookups, you could also create your own proprietary file format. You can utilize any combination of binary and textual data in your file. It’s hard to suggest possible layouts without knowing what data you need to store and how you’ll be accessing it.