C # FileSystemWatcher folder lock

I am trying to control a folder using C # and FileSystemWatcher. everything works well, except that I can delete the folder on which I am actually browsing

I used this in C using ReadDirectoryChangesW, creating a folder handle and locking it, which prevented the user from being deleted or renamed to this folder (I'm talking about the actual controlled folder, not the contents)

Is there a way to lock this folder so people don’t delete it while browsing?

(note that I do not want to change permissions for the folder, because it may be on a FAT32 / usb drive / etc drive that does not support permissions)

0
source share
1

, , () "". . ( , "" ).

, , , ...

+2

All Articles