- String path = urn.getPath();
-
- if ("\\".equals(File.separator))
- {
- //remove last separator at last position if found
- if (path.charAt(path.length() - 1) == '/')path = path.substring(0, path.length() - 1);
- path = path.replaceAll("/", "\\\\");
- }
- int index = path.lastIndexOf(File.separator);
- /*don t remember why
- if (index >-1)
- {//separator found, keep last part of the urn - filename
- path = path.substring(index+1, path.length());
- }
- *yop
- */
- return new File(urn.getPath());