- Home /
How to prevent people from editing files
I'm trying to create a program that sorts all the files in a directory. The only way I could think to do that is by having a dictionary which stores the filenames as keys and their position in the directory as values. There are obviously lots of problems with this method but the one I'm most worried about is the easily renamable files being susceptible to causing errors. So could I get some advice on:
-How to prevent people from altering filenames
-Whether it's possible to use the files themselves as keys somehow instead of their names
-An entire objectively better rework that isn't extremely susceptible to breaking
I don't really expect to get any answers because asking for help on this website is like shouting into the void but I'd appreciate help with any single one of my problems, Id rather have some help than none. Thankyou for your time.