I’m working on a program that acts much like dropbox but locally for my business. I have it setup where some users can’t write to some files/directories but they can still write locally. It’s not a huge problem, I can just redownload the file/directory but it would be nice if I could just lock it. (they would still need read though)
Share
I suggest you set the Read Only Attribute using the File.SetAttributes method.
To Set the file as Read Only:
To Set the file back to normal:
You can check to see if the file is read only, and then throw an error :