title: How Can I filter by a function in silverstripe
body: <p>I want to get a list of Files that are missing for a SilverStripe report.</p>
  <p>The filesize is not directly stored in the database, instead I have to call method getSize()</p>
  <p>If I try to iterate through the records and just choose the empty records, I only get the first level of the file hierarchy</p>
  <pre><code>    $all_files = File::get()-&gt;sort('FileFilename');
      $list = new ArrayList();
  
      foreach ($all_files as $file) {
        $file-&gt;mysize = $file-&gt;getSize();
        if($file-&gt;getSize() == &quot;&quot; &amp;&amp; $file-&gt;ClassName != 'SilverStripe\Assets\Folder'){
           $list-&gt;push($file);
        }
      }
      return $list;
  </code></pre>
  <p>How can I get all the records that are empty files?</p>