public function __construct($path, $pattern = '*') { if (substr($path, -1) != '/') { $path .= '/'; } $this->listFile($path, $pattern); }