code: public function isEmpty()
      {
          if ($this->test(\sndsgd\Fs::EXISTS | \sndsgd\Fs::READABLE) === false) {
              throw new \RuntimeException(
                  "failed to determine if a directory is empty; ".$this->getError()
              );
          }
  
          return count(scandir($this->path)) === 2;
      }
docs: Determine if a directory is empty
  
  @return bool
  @throws \RuntimeException If the directory does not exist or is not readable