public function add_directory($localname) {
        if ($this->emptyziphack) {
            $this->close();
            $this->open($this->archivepathname, file_archive::OVERWRITE, $this->encoding);
        }

        if (!isset($this->za)) {
            return false;
        }
        $localname = trim($localname, '/'). '/';
        $localname = $this->mangle_pathname($localname);

        if ($localname === '/') {
            // Sorry - conversion failed badly.
            return false;
        }

        if ($localname !== '') {
            if (!$this->za->addEmptyDir($localname)) {
                return false;
            }
            $this->modified = true;
        }
        return true;
    }
public function add_directory($localname) {
        if ($this->emptyziphack) {
            $this->close();
            $this->open($this->archivepathname, file_archive::OVERWRITE, $this->encoding);
        }

        if (!isset($this->za)) {
            return false;
        }
        $localname = trim($localname, '/'). '/';
        $localname = $this->mangle_pathname($localname);

        if ($localname === '/') {
            // Sorry - conversion failed badly.
            return false;
        }

        if ($localname !== '') {
            if (!$this->za->addEmptyDir($localname)) {
                return false;
            }
            $this->modified = true;
        }
        return true;
    }
public function add_directory ( $ localname ) { if ( $ this -> emptyziphack ) { $ this -> close ( ) ; $ this -> open ( $ this -> archivepathname , file_archive :: OVERWRITE , $ this -> encoding ) ; } if ( ! isset ( $ this -> za ) ) { return false ; } $ localname = trim ( $ localname , '/' ) . '/' ; $ localname = $ this -> mangle_pathname ( $ localname ) ; if ( $ localname === '/' ) { // Sorry - conversion failed badly. return false ; } if ( $ localname !== '' ) { if ( ! $ this -> za -> addEmptyDir ( $ localname ) ) { return false ; } $ this -> modified = true ; } return true ; }
Add empty directory into archive.

@param string $localname name of file in archive
@return bool success
Add empty directory into archive .