> And more specifically:http://msdn2.microsoft.com/en-us/library/system.io.file.getaccesscont...http://m
sdn2.microsoft.com/en-us/library/system.io.directory.getacces...
These are the classes I was looking at yesterday. Could you give an
example that just checks if an application can read a directory? I
have no idea how to use these methods.
Thanks!
Peter Duniho - 28 Jun 2007 18:06 GMT
> These are the classes I was looking at yesterday. Could you give an
> example that just checks if an application can read a directory? I
> have no idea how to use these methods.
It's not the application that can or cannot read a directory, it's the
user.
I admit, I haven't used the .NET ACL stuff. But I believe it's what you
want. You need to cross-reference the ACL retrieved for a file system
object with the current user and their rights, which should tell you the
theoretical rights you have for the object.
How to do this specifically, I don't know. But the ACL is where that
information is stored, so that's where I believe you need to start looking.
Pete