public static function createVersionNumberedFilename($file, $forceQueryString = FALSE) {
		$lookupFile = explode('?', $file);
		$path = self::resolveBackPath(self::dirname(PATH_thisScript) . '/' . $lookupFile[0]);

		if (TYPO3_MODE == 'FE') {
			$mode = strtolower($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['versionNumberInFilename']);
			if ($mode === 'embed') {
				$mode = TRUE;
			} else {
				if ($mode === 'querystring') {
					$mode = FALSE;
				} else {
					$doNothing = TRUE;
				}
			}
		} else {
			$mode = $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['versionNumberInFilename'];
		}

		if (!file_exists($path) || $doNothing) {
				// File not found, return filename unaltered
			$fullName = $file;

		} else {
			if (!$mode || $forceQueryString) {
					// If use of .htaccess rule is not configured,
					// we use the default query-string method
				if ($lookupFile[1]) {
					$separator = '&';
				} else {
					$separator = '?';
				}
				$fullName = $file . $separator . filemtime($path);

			} else {
					// Change the filename
				$name = explode('.', $lookupFile[0]);
				$extension = array_pop($name);

				array_push($name, filemtime($path), $extension);
				$fullName = implode('.', $name);
					// append potential query string
				$fullName .= $lookupFile[1] ? '?' . $lookupFile[1] : '';
			}
		}

		return $fullName;
	}