/** * Create the directory * * @return Centurion_Ftp_Directory */ public function create($permissions = null) { $makedir = @ftp_mkdir($this->_ftp->getConnection(), $this->_path); if ($makedir === false) { //throw new Centurion_Ftp_Directory_Exception('Unable to create directory "' . $dir . '"'); } if ($permissions !== null) { $chmod = $this->_ftp->chmod($this->_path, $permissions); if ($chmod === false) { //throw new Centurion_Ftp_Directory_Exception('Unable to chmod directory "' . $dir . '"'); } } return $this; }
/** * Change the file permissions * * @param int|string $mode * @return Centurion_Ftp_File */ public function chmod($mode) { $this->_ftp->chmod($this->_path, $mode); return $this; }