src/Util/VolatileDirectory.php
public static function getSystemTemporaryDirectory()
    {
        $tempDir = @sys_get_temp_dir();
        if (is_string($tempDir)) {
            $tempDir = str_replace(DIRECTORY_SEPARATOR, '/', (string) $tempDir);
            if ($tempDir !== '/') {
                $tempDir = rtrim($tempDir, '/');
            }
        } else {
            $tempDir = '';
        }
        if ($tempDir === '' || !is_dir($tempDir)) {
            throw new Exception\PathNotFound($tempDir, 'Unable to detect the system temporary directory.');
        }

        return $tempDir;
    }
public static function getSystemTemporaryDirectory()
    {
        $tempDir = @sys_get_temp_dir();
        if (is_string($tempDir)) {
            $tempDir = str_replace(DIRECTORY_SEPARATOR, '/', (string) $tempDir);
            if ($tempDir !== '/') {
                $tempDir = rtrim($tempDir, '/');
            }
        } else {
            $tempDir = '';
        }
        if ($tempDir === '' || !is_dir($tempDir)) {
            throw new Exception\PathNotFound($tempDir, 'Unable to detect the system temporary directory.');
        }

        return $tempDir;
    }
public static function getSystemTemporaryDirectory ( ) { $ tempDir = @ sys_get_temp_dir ( ) ; if ( is_string ( $ tempDir ) ) { $ tempDir = str_replace ( DIRECTORY_SEPARATOR , '/' , ( string ) $ tempDir ) ; if ( $ tempDir !== '/' ) { $ tempDir = rtrim ( $ tempDir , '/' ) ; } } else { $ tempDir = '' ; } if ( $ tempDir === '' || ! is_dir ( $ tempDir ) ) { throw new Exception \ PathNotFound ( $ tempDir , 'Unable to detect the system temporary directory.' ) ; } return $ tempDir ; }
Get the path of the system temporary directory.

@throws \ComposerPatcher\Exception\PathNotFound when the temporary directory can't be retrieved or when it does not exist

@return string
Get the path of the system temporary directory .