public static function createTmpFile($folder = null, $checkAndCreatePath = true) {
		if ($folder === null) {
			$folder = TMP;
		}
		if ($checkAndCreatePath === true && !is_dir($folder)) {
			new Folder($folder, true);
		}

		return $folder . Text::uuid();
	}
public static function createTmpFile($folder = null, $checkAndCreatePath = true) {
		if ($folder === null) {
			$folder = TMP;
		}
		if ($checkAndCreatePath === true && !is_dir($folder)) {
			new Folder($folder, true);
		}

		return $folder . Text::uuid();
	}
public static function createTmpFile ( $ folder = null , $ checkAndCreatePath = true ) { if ( $ folder === null ) { $ folder = TMP ; } if ( $ checkAndCreatePath === true && ! is_dir ( $ folder ) ) { new Folder ( $ folder , true ) ; } return $ folder . Text :: uuid ( ) ; }
Creates a temporary file name and checks the tmp path, creates one if required.

This method is thought to be used to generate tmp file locations for use cases
like audio or image process were you need copies of a file and want to avoid
conflicts. By default the tmp file is generated using cakes TMP constant +
folder if passed and a uuid as filename.

@param string|null $folder
@param bool|bool $checkAndCreatePath
@return string For example /var/www/app/tmp/<uuid> or /var/www/app/tmp/<my-folder>/<uuid>
Creates a temporary file name and checks the tmp path creates one if required .