private static function get_timestamped_url($file, $type) {
	$search  = ['{{root_dir}}', '{{type}}'];
	$replace = [self::$root_dir, $type];
	$base_path = str_replace($search, $replace, self::$base_path);
	$base_url  = str_replace($search, $replace, self::$base_url);
	
	$file      = trim($file);
	$absolute  = ($file[0] == '/');
	$file      = ($absolute) ? $file : $base_url.$file;
	$full_path = $base_path.$file.'.'.$type;
	
	if (file_exists($full_path) == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('can not find '.$type.' resource '.$file);
	}
	
	$timestamp = filemtime($full_path);
	$full_url  = $file.'.'.$timestamp.'.'.$type;
	
	return $full_url;
}