I want to keep a list of files of the SD card in RAM. So a kind of dictionary. The files can be in an arbitrary folders (or subfolders) in the SD card. In the code I want to quickly check if a given file name (with path) exists in the SD card.
Instead of storing a list of all file names and paths of the SD card in RAM, I was thinking of storing only a hash of each filepath to save RAM.
Do you know a fast and simple algorithm to convert a file path to a hash? The resulted hash id should be max 32-bit if possible.