File/Folder security for current context

D

Davie

How can I implement a function to show what kind file security access the
current context has on a file, for example:-


public enum AccessType
FullControl
Modify
Read
Write
end enum

private function GetAccess(pathStr as string) as AccessType
...
end function

Hope this explains.

I know I could wrap code inside a try catch block, but this seems a little
expensive. Hopefully there is something in the new FileSecurity features in
..NET 2 that does this a little smarter.

Any help would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top