I'm going to create a music library program, easy. Storing the information, easy.
I previously looked at another music library made in c#, the guy claimed that even if you move the file, on rediscovery it will know all the information about that file retrieved from the database (xml, sql).
More info on rediscovery: When you move files you have to get the music library to rediscover because its current information is wrong, such as the file path, on re discovery it will find the file, check it in the database, and update any information
I thought this is impossible, till now. If you hash a file and use that hash as the key, you can then use that to always check the file to make sure it is the one.
Please correct me if I'm wrong and confirm what I'm saying is true (that is the question).
- File path isn't used in hashing the file. (I don't know how to hash)
- Re hash after every ID3 tag write (changing the file changes the hash?)
- Using the Hash as an Key/Id will mean that if the file is moved it can be still referenced to the information stored about it
- Once information read is read out of the xml (if we're using xml as a database) file, storing it in a dictionary is the quickest and best way to have the contents in memory
It is a question, it needs an answer, its about c#. I'm using c#, thats why it's specific, I'm doing background research, I just wanted some expert opinion on what i've stated