Determining if a directory is writeable

  • Thread starter Thread starter Marco Shaw
  • Start date Start date
M

Marco Shaw

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
 
Back
Top