title: Is there a better way than this to find out if an IsolatedStorage file exists or not?
body: <p>I'm using <strong>IsolatedStorage</strong> in a <strong>Silverlight</strong> application for caching, so I need to know if the file exists or not which I do with the following method.</p>
  
  <p>I couldn't find a <strong>FileExists</strong> method for IsolatedStorage so I'm just catching the exception, but it seems to be a quite <strong>general exception</strong>, I'm concerned it will catch more than if the file doesn't exist.</p>
  
  <p><strong>Is there a better way to find out if a file exists in IsolatedStorage than this:</strong></p>
  
  <pre><code>public static string LoadTextFromIsolatedStorageFile(string fileName)
  {
      string text = String.Empty;
  
      using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
      {
          try
          {
              using (IsolatedStorageFileStream isfs = new IsolatedStorageFileStream(fileName,
                              FileMode.Open, isf))
              {
                  using (StreamReader sr = new StreamReader(isfs))
                  {
                      string lineOfData = String.Empty;
                      while ((lineOfData = sr.ReadLine()) != null)
                          text += lineOfData;
                  }
              }
              return text;
          }
          catch (IsolatedStorageException ex)
          {
              return "";
          }
      }
  }
  </code></pre>