I have an application that depends upon a folder existing on the system and I want to prevent the user from being able to delete it. The only way I can think of is to create a dummy file within the folder and keep an active file handle open upon it. This is fine, but I was wondering if there was a more elegant and/or established way of doing this.

My application is activated when the system starts and ends when the system shuts down.