private function getTempDir($volumeTempPath = null) {
		$testDirs = array();
		if (function_exists('sys_get_temp_dir')) {
			$testDirs[] = sys_get_temp_dir();
		}
		if ($volumeTempPath) {
			$testDirs[] = rtrim(realpath($volumeTempPath), DIRECTORY_SEPARATOR);
		}
		$tempDir = '';
		$test = DIRECTORY_SEPARATOR . microtime(true);
		foreach($testDirs as $testDir) {
			if (!$testDir) continue;
			$testFile = $testDir.$test;
			if (touch($testFile)) {
				unlink($testFile);
				$tempDir = $testDir;
				$gc = time() - 3600;
				foreach(glob($tempDir . '/ELF*') as $cf) {
					if (filemtime($cf) < $gc) {
						@unlink($cf);
					}
				}
				break;
			}
		}
		return $tempDir;
	}
private function getTempDir($volumeTempPath = null) {
		$testDirs = array();
		if (function_exists('sys_get_temp_dir')) {
			$testDirs[] = sys_get_temp_dir();
		}
		if ($volumeTempPath) {
			$testDirs[] = rtrim(realpath($volumeTempPath), DIRECTORY_SEPARATOR);
		}
		$tempDir = '';
		$test = DIRECTORY_SEPARATOR . microtime(true);
		foreach($testDirs as $testDir) {
			if (!$testDir) continue;
			$testFile = $testDir.$test;
			if (touch($testFile)) {
				unlink($testFile);
				$tempDir = $testDir;
				$gc = time() - 3600;
				foreach(glob($tempDir . '/ELF*') as $cf) {
					if (filemtime($cf) < $gc) {
						@unlink($cf);
					}
				}
				break;
			}
		}
		return $tempDir;
	}
private function getTempDir ( $ volumeTempPath = null ) { $ testDirs = array ( ) ; if ( function_exists ( 'sys_get_temp_dir' ) ) { $ testDirs [ ] = sys_get_temp_dir ( ) ; } if ( $ volumeTempPath ) { $ testDirs [ ] = rtrim ( realpath ( $ volumeTempPath ) , DIRECTORY_SEPARATOR ) ; } $ tempDir = '' ; $ test = DIRECTORY_SEPARATOR . microtime ( true ) ; foreach ( $ testDirs as $ testDir ) { if ( ! $ testDir ) continue ; $ testFile = $ testDir . $ test ; if ( touch ( $ testFile ) ) { unlink ( $ testFile ) ; $ tempDir = $ testDir ; $ gc = time ( ) - 3600 ; foreach ( glob ( $ tempDir . '/ELF*' ) as $ cf ) { if ( filemtime ( $ cf ) < $ gc ) { @ unlink ( $ cf ) ; } } break ; } } return $ tempDir ; }
Get temporary dirctroy path

@param  string $volumeTempPath
@return string
@author Naoki Sawada
Get temporary dirctroy path