I was working on a project in visual studio, in my project i need to create some files and folders for backup, but if someone accidentally delete or moved those files or folders that my project/software is using while running then it will shutdown or also can be crashed because i didn't used exception handling. I only need to block access for not moving those directories only while using them.
There is only one way to achieve that, In the starting of your program you have to open all those files which you don't want others to move or delete, and keep it open until you did not close your application.