Domanda

I'm wondering if there is a way for a process to "lock" a complete folder/directory and not allow any other process (except its child process created using Process.Start) to modify/delete anything in there. I don't mind allow read-only access, but that's not a requirement.

The idea is that MyProcess should be able to acquire a lock on a DIRECTORY (not a file) and not allow any other process to modify the contents of that directory. It is a requirement however that the INHERITED PROCESS (started using Process.Start() from MyProcess) should be able to modify that directory, but no one else.

I'm using C# (Windows environment).

Nessuna soluzione corretta

Altri suggerimenti

The simple answer is: No. This is not a scenario supported by the operating system.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top