If File was send then exist in amount one or greater, if File was not send then it probably return false in your condition.
I suggest something like that:
public function beforeSave($options = array()) {
if (empty($this->data[$this->alias]['id'])) {
if (count($this->data[$this->alias]['File']) == 0) {
$this->invalidate('File', "Postmust include at least one file.", false);
return false;
}
}
return parent::beforeSave($options);
}
This will work when you create new record where id was not saved yet. I hope this will help.