public static function checkTemporaryFolder() {
		
		if (!file_exists(static::TEMP_FOLDER) or !is_dir(static::TEMP_FOLDER)) {
			
			// remove any file named as wanted temporary folder
			@unlink(static::TEMP_FOLDER);

			// create the folder
			$old = umask(0);
			if (!mkdir(static::TEMP_FOLDER, 0777, TRUE)) {
				trigger_error('Directory creation on ' . static::TEMP_FOLDER . ' failed');
				$ret = FALSE;
			}
			umask($old);
			
			// sets full permissions
			if (!chmod(static::TEMP_FOLDER, 0777)) {
				trigger_error('Set permissions on directory ' . static::TEMP_FOLDER . ' failed');
				$ret = FALSE;
			}
			
		}
		
	}
public static function checkTemporaryFolder() {
		
		if (!file_exists(static::TEMP_FOLDER) or !is_dir(static::TEMP_FOLDER)) {
			
			// remove any file named as wanted temporary folder
			@unlink(static::TEMP_FOLDER);

			// create the folder
			$old = umask(0);
			if (!mkdir(static::TEMP_FOLDER, 0777, TRUE)) {
				trigger_error('Directory creation on ' . static::TEMP_FOLDER . ' failed');
				$ret = FALSE;
			}
			umask($old);
			
			// sets full permissions
			if (!chmod(static::TEMP_FOLDER, 0777)) {
				trigger_error('Set permissions on directory ' . static::TEMP_FOLDER . ' failed');
				$ret = FALSE;
			}
			
		}
		
	}
public static function checkTemporaryFolder ( ) { if ( ! file_exists ( static :: TEMP_FOLDER ) or ! is_dir ( static :: TEMP_FOLDER ) ) { // remove any file named as wanted temporary folder @ unlink ( static :: TEMP_FOLDER ) ; // create the folder $ old = umask ( 0 ) ; if ( ! mkdir ( static :: TEMP_FOLDER , 0777 , TRUE ) ) { trigger_error ( 'Directory creation on ' . static :: TEMP_FOLDER . ' failed' ) ; $ ret = FALSE ; } umask ( $ old ) ; // sets full permissions if ( ! chmod ( static :: TEMP_FOLDER , 0777 ) ) { trigger_error ( 'Set permissions on directory ' . static :: TEMP_FOLDER . ' failed' ) ; $ ret = FALSE ; } } }
Check temporary folder or create it.
Check temporary folder or create it .