There is no a managed way to acquire file/directory permissions (Access Control List), according to this
http://bytes.com/topic/c-sharp/answers/259010-reading-file-permissions[
^]. You can do this via Windows API and P/Invoke.
See also this, a useful set of related codelets:
http://www.java2s.com/Tutorial/CSharp/0300__File-Directory-Stream/0240__File-Permission.htm[
^].
Permission is not the only reason for inaccessible files.
However, do you really need to get into this sophisticated stuff? I have my own practical non-nonsense approach to this. I do access under try-catch block, catch access exception and process it the way I want. It is very practical, because it's very hard to do all checks. This is exactly what structured exceptions are design for. As access to a new file system object does not happen often, there is no performance hit.
—SA