Let's say I have 100,000 files on a computer. And they are not too big, but not too small either. Let's say around 50MB each. But they can be all different sizes from very small to 5-6GB.
Note these numbers are arbitrary, I don't have those files. Everything is theoretical.
I was wondering what is the best folder setup for storing those files? And does it differ for different operating systems? Does it depend on the filesystem? Can an imaginary operating system exist that doesn't store information on the HDD as files and folders? Or is this files and folders structure dependent on the hard drive's filesystem format? Is storing them in one folder a good idea? Or is it better for storing them in a height-balanced tree? Or in weight-balanced tree? What are the drawbacks for having many folders? How much space does it take to have a folder (I know it's a little)? What are the drawbacks of having a very deep directory structure? Are there any existing solutions for managing many files? Does the best solution depend on the number of files and the file size directly? Is there an optimal solution that does not involve file size and file number?
I know that these are a whole lot of questions.
Also note that the files are going to be browsed by software and not by an user directly.
Why am I asking all those questions about files, folders and filesystems?
Well, I am planning to make a program that runs on any OS and is something like file-explorer. You can have files and folders, but on the OS they will be stored differently. For example I have 50 files in one virtual folder, and the program manages to arranges them on the hard drive in sub-folders.