Ejemplo n.º 1
0
 /**
  * Create the directory
  * 
  * @return Zend_Ftp_Directory
  */
 public function create($permissions = null)
 {
     $makedir = @ftp_mkdir($this->_ftp->getConnection(), $this->_path);
     if ($makedir === false) {
         //throw new Zend_Ftp_Directory_Exception('Unable to create directory "' . $dir . '"');
     }
     if ($permissions !== null) {
         $chmod = $this->_ftp->chmod($this->_path, $permissions);
         if ($chmod === false) {
             //throw new Zend_Ftp_Directory_Exception('Unable to chmod directory "' . $dir . '"');
         }
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Change the file permissions
  * 
  * @param int|string $mode
  * @return Zend_Ftp_File
  */
 public function chmod($mode)
 {
     $this->_ftp->chmod($this->_path, $mode);
     return $this;
 }