문제

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).

올바른 솔루션이 없습니다

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top