/[schmitzm]
ViewVC logotype

Revision 1054


Jump to revision: Previous Next
Author: alfonx
Date: Thu Sep 23 17:37:48 2010 UTC (14 years, 5 months ago)
Changed paths: 1
Log Message:
Improved Path readability under windows by adding to IOUtil:


	/**
	 * Bereinigt Pfadangaben, z.b. "C:\Programme" zu "C:\\Programme" und
	 * "Eigene%20Dateien" zu "Eigene Dateien"
	 */

	public static String escapePath(String path) {
		if (path == null) return "";
		path = path.replace("\\", "\\\\");
		path = path.replace("%20", " ");
		return path;
	}

	/**
	 * Liefert eine bereinigt Absolute-Pfadangaben, z.b. "C:\Programme" zu "C:\\Programme" und
	 * "Eigene%20Dateien" zu "Eigene Dateien"
	 */
	public static String escapePath(File file) {
		if (file == null) return "";
		return escapePath(file.getAbsolutePath());
	}

Changed paths

Path Details
Directorytrunk/src/schmitzm/io/IOUtil.java modified , text changed

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26