I have given scenario:
- Create directory on NFS
If that directory exists delete it with all content and then create empty directory
if (Directory.Exists(destinationPath)) { Directory.Delete(destinationPath, true); } Directory.CreateDirectory(destinationPath);
Quite simple and it works but only if Im not inside that directory. If user is inside that directory (using for example file explorer) then is being kicked off, directory is deleted but next is not created.
Do you have experience with such a situation?