public function filedepot_archiver::__construct in filedepot 7
Same name in this branch
- 7 filedepot_archiver.class.php \filedepot_archiver::__construct()
- 7 filedepot_archiver.zip.class.php \filedepot_archiver::__construct()
Instantiates a new zip archive object - also creates the zip file
File
- ./
filedepot_archiver.class.php, line 151 - filedepot_archiver.class.php Archiving class for filedepot
Class
- filedepot_archiver
- @file filedepot_archiver.class.php Archiving class for filedepot
Code
public function __construct() {
$this->filedepotInstance = filedepot::getInstance();
$this->archiveDirPath = drupal_realpath('private://filedepot/') . '/tmp_archive/';
$tmp_archive_dirpath = drupal_realpath('private://filedepot/') . '/tmp_archive/' . uniqid("fdarchive") . '/';
//shell_exec("cd {$tmp_archive_dirpath}");
//$ret = chdir($this->archiveDirPath);
$this->archiveStorePath = $tmp_archive_dirpath;
//uniqid("fdarchive") . '/';
if (file_exists($this->archiveDirPath) === FALSE) {
mkdir($this->archiveDirPath, 0777, TRUE);
}
$this->uniquename = uniqid("filedepot_") . ".zip";
$this->zipFileName = $this->archiveDirPath . $this->uniquename;
@unlink($this->zipFileName);
//$this->open($this->zipFileName, ZIPARCHIVE::CREATE);
$this->filedepotStoragePath = drupal_realpath($this->filedepotInstance->root_storage_path);
}