original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Get temporary dirctroy path
  
  @param  string $volumeTempPath
  @return string
  @author Naoki Sawada
docstring_tokens: Get temporary dirctroy path