List of utility methods to do Path Separator Get
String | fixFileSeparators(String filename) Fix up filename separators for platform independence. if (filename == null) { return null; switch (File.separatorChar) { case '/': return filename.replace('\\', File.separatorChar); case '\\': return filename.replace('/', File.separatorChar); ... |
String | getPathSeparator() get Path Separator return java.io.File.pathSeparator;
|
String | getSeparator() get Separator return System.getProperty("file.separator"); |
boolean | isWindowsPathSeparator(String p_filename) Check if the filename contains Windows path separator. if (StringUtil.isEmpty(p_filename)) return true; if (p_filename.indexOf("/") != -1) return false; else if (p_filename.indexOf("\\") != -1) return true; return false; |
File | fixFileSeparators(File file) Fix up file separators for platform independence. if (file == null) { return null; return new File(fixFileSeparators(file.getPath())); |