How do you find out if a local directory or a shared directory exists?