Here you can find the source of normalizePath(String fileSystemPath)
Parameter | Description |
---|---|
fileSystemPath | The file system path to normalize |
public static String normalizePath(String fileSystemPath)
//package com.java2s; public class Main { /** * Normalizes the filesystem paths so that we only see '/' for the * path separator character regardless of host operating system. * * @param fileSystemPath The file system path to normalize * * @return The normalized version of the filesystem path *///from w ww. j a v a 2 s .co m public static String normalizePath(String fileSystemPath) { return fileSystemPath.replaceAll("\\\\", "/").replace("//", "/"); } }