title: Convert IEnumerable<string> into IEnumerable<FileInfo>
body: <p>Is there a way to get <code>IEnumerable&lt;FileInfo&gt;</code> out of <code>Directory.EnumerateDirectories(..)</code> ?</p>
  
  <p>My Method looks like this.</p>
  
  <pre><code>public static IEnumerable&lt;String&gt; EnumerateFiles(String path, String searchPattern, SearchOption searchOpt)
  {
      try
      {
          IEnumerable&lt;string&gt; dirFiles = Enumerable.Empty&lt;String&gt;();
          if (searchOpt == SearchOption.AllDirectories)
          {
              dirFiles = Directory.EnumerateDirectories(path)
                                  .SelectMany(x =&gt; EnumerateFiles(x, searchPattern, searchOpt));
          }
          return dirFiles.Concat(Directory.EnumerateFiles(path, searchPattern));
      }
      catch (UnauthorizedAccessException ex)
      {
          return Enumerable.Empty&lt;String&gt;();
      }
  }
  </code></pre>
  
  <p>I also like to Implement :</p>
  
  <pre><code>public static IEnumerable&lt;FileInfo&gt; EnumerateFiles(String path, String searchPattern, SearchOption searchOpt)
  {
    //...code
  }
  </code></pre>