public function mkdir($dir) { if (!ftp_mkdir($this->conn, $dir)) { throw new Exception('Error: There was an error making the directory ' . $dir); } return $this; }