title: What is the Linq.First equivalent in PowerShell?
body: <p>The snippet below detects from a list of files which of them is a Directory on Ftp</p>
  
  <p>as C# it will be like below</p>
  
  <pre><code>var files = new List&lt;string&gt;(){"App_Data", "bin", "Content"};
  var line = "drwxr-xr-x 1 ftp ftp              0 Mar 18 22:41 App_Data"
  var dir = files.First(x =&gt; line.EndsWith(x));
  </code></pre>
  
  <p>How I can transalte the last line in PowerShell ?</p>