I have a problem.
I have a file named for example abc. While working on this file I'll get some others files, which will have some unique info like tags or some values. I want to name them abc#unique_id. It's like a perfect/injective hash function. I can't use a normal hash function, because I can get a collision of hashes. I was thinking about generating a random number and checking if file named so exists, if yes then generate another number. But this can be less efficient if there will be more files.