public function filterResult(callable $filter)
    {
        $result = [];

        foreach ($this->files as $file) {
            if ($filter($file)) {
                $result[] = $file;
            }
        }

        return $result;
    }