I got this exam question "How to Stop a user from deleting the file?" I assume I should use some permission attribute, but which?
Use FileInfo and set its .IsReadOnly property.
Dim fi As New FileInfo("c:\temp\temp.txt")
fi.IsReadOnly = value
You cannot prevent a user with administrative rights from deleting a file. After all, he can overtake the file's ownership and change the permissions.
精彩评论