/** Create a string that is a IRI for the filename. * <li>The file name may already have {@code file:}. * <li>The file name may be relative. * <li>Encode using the rules for a path (e.g. ':' and'/' do not get encoded) * <li>Non-IRI characters get %-encoded. */ public static String filenameToIRI(String fn) { if ( fn == null ) return cwdURL ; if ( fn.length() == 0 ) return cwdURL ; if ( fn.startsWith("file:") ) return normalizeFilenameURI(fn) ; return plainFilenameToURL(fn) ; }
/** Create a string that is a IRI for the filename. * <li>The file name may already have {@code file:}. * <li>The file name may be relative. * <li>Encode using the rules for a path (e.g. ':' and'/' do not get encoded) * <li>Non-IRI characters get %-encoded. */ public static String filenameToIRI(String fn) { if ( fn == null ) return cwdURL ; if ( fn.length() == 0 ) return cwdURL ; if ( fn.startsWith("file:") ) return normalizeFilenameURI(fn) ; return plainFilenameToURL(fn) ; }