/**
  * Instantiates a new zip archive object - also creates the zip file
  */
 public function __construct()
 {
     $this->filedepotInstance = filedepot::getInstance();
     $this->archiveDirPath = drupal_realpath('private://filedepot/') . '/tmp_archive/';
     if (file_exists($this->archiveDirPath) === FALSE) {
         mkdir($this->archiveDirPath, 0777, TRUE);
     }
     $this->zipFileName = $this->archiveDirPath . uniqid("filedepot_") . ".zip";
     @unlink($this->zipFileName);
     $this->open($this->zipFileName, ZIPARCHIVE::CREATE);
     $this->filedepotStoragePath = drupal_realpath($this->filedepotInstance->root_storage_path);
 }
 public static function getInstance()
 {
     if (self::$_instance === NULL) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }