question: public static String URIforPortablePath ( String path ) { if ( path . startsWith ( FileUtil . PREFERENCES ) ) { return path . replaceFirst ( FileUtil . PREFERENCES , "/prefs/" ) ; } else if ( path . startsWith ( FileUtil . PROGRAM ) ) { return path . replaceFirst ( FileUtil . PROGRAM , "/dist/" ) ; } else { return null ; } }
target:  Get the public URI for a portable path. This method returns public URIs for only some portable paths, and does not check that the portable path is actually sane. Note that this refuses to return portable paths that are outside of program: and preference: