public static String toUnixPath ( String path ) { String uPath = path ; if ( uPath . contains ( "\\" ) ) { uPath = uPath . replaceAll ( "\\\\" , "/" ) ; } // this should be removed, it's need since "\" is added AtomCache code if ( uPath . endsWith ( "//" ) ) { uPath = uPath . substring ( 0 , uPath . length ( ) - 1 ) ; } if ( ! uPath . endsWith ( "/" ) ) { uPath = uPath + "/" ; } return uPath ; }
Converts path to Unix convention and adds a terminating slash if it was omitted