Task/File/FolderBrowserTask.php
public function next(ProcessState $state)
    {
        if (!$this->files) {
            return false;
        }
        $this->files->next();
        $state->removeErrorContext('current_file_path');

        return $this->files->valid();
    }
public function next(ProcessState $state)
    {
        if (!$this->files) {
            return false;
        }
        $this->files->next();
        $state->removeErrorContext('current_file_path');

        return $this->files->valid();
    }
Moves the internal pointer to the next element,
return true if the task has a next element
return false if the task has terminated it's iteration

@param ProcessState $state

@return bool