title: Determine if a network share exists before mounting
body: <p>I'm working on a tool to automatically mount network volumes based on what wireless network the user is connected to. Mounting the volume is easy:</p>
  
  <pre><code>NSURL *volumeURL = /* The URL to the network volume */
  
  // Attempt to mount the volume
  FSVolumeRefNum volumeRefNum;
  OSStatus error = FSMountServerVolumeSync((CFURLRef)volumeURL, NULL, NULL, NULL, &amp;volumeRefNum, 0L);
  </code></pre>
  
  <p>However, if there is no network share at <code>volumeURL</code> (if someone turned off or removed a network hard drive, for example), Finder pops up an error message explaining this fact. My goal is for this not to happen — I'd like to attempt to mount the volume, but fail silently if mounting fails.</p>
  
  <p>Does anyone have any tips on how to do this? Ideally, I'd like to find a way to check if the share exists before attempting to mount it (so as to avoid unnecessary work). If that's not possible, some way to tell the Finder not to display its error message would work as well.</p>