My Google skills must be failing me, but I cannot seem to get to the information I need.

I have a database that is residing on the network. How do I programatically determine if the curent user have read write rights to this directory?

Thank You in advance.