private function tempDir()
{
$tempPath = tempnam($this->tmp, 'elFinder');
if (!$tempPath) {
$this->setError(elFinder::ERROR_CREATING_TEMP_DIR, $this->tmp);
return false;
}
$success = unlink($tempPath);
if (!$success) {
$this->setError(elFinder::ERROR_CREATING_TEMP_DIR, $this->tmp);
return false;
}
$success = mkdir($tempPath, 0700, true);
if (!$success) {
$this->setError(elFinder::ERROR_CREATING_TEMP_DIR, $this->tmp);
return false;
}
return $tempPath;
}