Determining if a directory is writeable

Tech-Archive recommends: Fix windows errors by optimizing your registry



Is there something built-in to .net to determine if a directory is writeable
by the current user?

I want to write a Windows Powershell script that needs to write to a
directory. I can certainly do something in PSH to get the current user,
then determine if the ACLs will allow writing, but perhaps .net has a
one-liner?

I know I can also just use PSH to try to write to the dir, then retrive the
error value. Still, wondering if there's a prettier solution...

Marco


.