code: public function files(?int $constraints = null): \Generator
      {
          foreach ($this->all($constraints) as $file) {
              if (!$file->isDir()) {
                  yield $file;
              }
          }
      }
docs: list only files
  @param int|null $constraints
  @return File[]