Current Context File Access Type in .NET 2

  • Thread starter Thread starter Davie
  • Start date Start date
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 that does this a little smarter.

Any help would be greatly appreciated.
 
Back
Top