src/Slashworks/AppBundle/Resources/private/api/zip.lib.php
public function addDirectory($directoryPath, $timestamp = 0, $fileComment = NULL, $extFileAttr = self::EXT_FILE_ATTR_DIR) {
        if ($this->isFinalized) {
            return FALSE;
        }
        $directoryPath = str_replace("\\", "/", $directoryPath);
        $directoryPath = rtrim($directoryPath, "/");

        if (strlen($directoryPath) > 0) {
            $this->buildZipEntry($directoryPath.'/', $fileComment, "\x00\x00", "\x00\x00", $timestamp, "\x00\x00\x00\x00", 0, 0, $extFileAttr);
            return TRUE;
        }
        return FALSE;
    }
public function addDirectory($directoryPath, $timestamp = 0, $fileComment = NULL, $extFileAttr = self::EXT_FILE_ATTR_DIR) {
        if ($this->isFinalized) {
            return FALSE;
        }
        $directoryPath = str_replace("\\", "/", $directoryPath);
        $directoryPath = rtrim($directoryPath, "/");

        if (strlen($directoryPath) > 0) {
            $this->buildZipEntry($directoryPath.'/', $fileComment, "\x00\x00", "\x00\x00", $timestamp, "\x00\x00\x00\x00", 0, 0, $extFileAttr);
            return TRUE;
        }
        return FALSE;
    }
public function addDirectory ( $ directoryPath , $ timestamp = 0 , $ fileComment = NULL , $ extFileAttr = self :: EXT_FILE_ATTR_DIR ) { if ( $ this -> isFinalized ) { return FALSE ; } $ directoryPath = str_replace ( "\\" , "/" , $ directoryPath ) ; $ directoryPath = rtrim ( $ directoryPath , "/" ) ; if ( strlen ( $ directoryPath ) > 0 ) { $ this -> buildZipEntry ( $ directoryPath . '/' , $ fileComment , "\x00\x00" , "\x00\x00" , $ timestamp , "\x00\x00\x00\x00" , 0 , 0 , $ extFileAttr ) ; return TRUE ; } return FALSE ; }
Add an empty directory entry to the zip archive.
Basically this is only used if an empty directory is added.

@param string $directoryPath Directory Path and name to be added to the archive.
@param int    $timestamp     (Optional) Timestamp for the added directory, if omitted or set to 0, the current time will be used.
@param string $fileComment   (Optional) Comment to be added to the archive for this directory. To use fileComment, timestamp must be given.
@param int    $extFileAttr   (Optional) The external file reference, use generateExtAttr to generate this.
@return bool $success
Add an empty directory entry to the zip archive . Basically this is only used if an empty directory is added .