Here you can find the source of normalizePathname(String pathname)
Parameter | Description |
---|---|
original | the path to normalize. |
public static String normalizePathname(String pathname)
//package com.java2s; /* Copyright ? 2015 Gerald Rosenberg. * Use of this source code is governed by a BSD-style * license that can be found in the License.md file. *///w w w . j a v a 2 s . co m public class Main { /** * Replaces all backslashes with slash char. Throws NPE if the original path is null. * * @param original the path to normalize. * @return the normalized path */ public static String normalizePathname(String pathname) { return pathname.replaceAll("\\\\", "/"); } }