Hello any kings of the algorithm in the audience. Heres a trick that I need my program to do, but I am not able to think of a very fast, low cost solution for.
I want my program to monitor files and check their contents against pre-definded values. When it starts, I need it check maybe about 1000 files to make sure that they either, do not exist or exist but do not have illigal changes made to them. And after that, I need my program to watch the entire folder heirarchy to make sure they do not insert or create new files while my program is running.
I know vb .net has a filesystem watcher control, but that only solves one of my problems and I do not know if its very fast.
The program is going to be running in the background of a video game, so the program needs to run fast, so fast that there will not be a noticable lag at startup, or during the game.
If any of you play with steam a lot, you can get a better grip on my project. In half life 2, the source engine allows a lot of editing to take place in the game files. It reads probably about 70% of what it does from files outside the engine. Which is good for modders, but horrible for a game like CSS where any player can copy a 1 color skin into a directory and have all the Terrorists running around bright pink. What I want my program to do is monitor the folder structure, and make sure these files firstly do not exist, and secondly make sure they never do exist by performing systematic scans of the file structure.
The best thing I can come up with is do a few crc's on the files I want to check, but this does not stop people from creating new files, I can have the program scan with it all hard coded, but thats really really slopy. So I have been on the hunt for some open source folder scanners or the like that will fit my needs.
So if you can think of a good way to accomplish this with minimal effort cpu side, please post. And it does not have to be strickly vb code. I just need some general brain storm ideas.
Thank you
I want my program to monitor files and check their contents against pre-definded values. When it starts, I need it check maybe about 1000 files to make sure that they either, do not exist or exist but do not have illigal changes made to them. And after that, I need my program to watch the entire folder heirarchy to make sure they do not insert or create new files while my program is running.
I know vb .net has a filesystem watcher control, but that only solves one of my problems and I do not know if its very fast.
The program is going to be running in the background of a video game, so the program needs to run fast, so fast that there will not be a noticable lag at startup, or during the game.
If any of you play with steam a lot, you can get a better grip on my project. In half life 2, the source engine allows a lot of editing to take place in the game files. It reads probably about 70% of what it does from files outside the engine. Which is good for modders, but horrible for a game like CSS where any player can copy a 1 color skin into a directory and have all the Terrorists running around bright pink. What I want my program to do is monitor the folder structure, and make sure these files firstly do not exist, and secondly make sure they never do exist by performing systematic scans of the file structure.
The best thing I can come up with is do a few crc's on the files I want to check, but this does not stop people from creating new files, I can have the program scan with it all hard coded, but thats really really slopy. So I have been on the hunt for some open source folder scanners or the like that will fit my needs.
So if you can think of a good way to accomplish this with minimal effort cpu side, please post. And it does not have to be strickly vb code. I just need some general brain storm ideas.
Thank you