String (@NotNull String path, char separatorChar, boolean removeLastSlash) { try { return new File(path).getCanonicalPath().replace(separatorChar, '/'); } catch (IOException ignore) { // fall back to the default behavior return toCanonicalPath(path, separatorChar, removeLastSlash, false); } }