public static String normalizeDirPath ( String dirPath ) { if ( dirPath == null || dirPath . isEmpty ( ) ) return "" ; dirPath = dirPath . replace ( "\\" , "/" ) ; if ( ! dirPath . endsWith ( "/" ) ) { dirPath = dirPath + "/" ; } return dirPath ; }
Normalize a path that represents a directory