/** * Get file's current URI. <b>Note:</b> if this VirtualFile refers to a directory <b>at the time of this * method invocation</b>, a trailing slash will be appended to the URI; this means that invoking * this method may require a filesystem access, and in addition, may not produce consistent results * over time. * * @return the current uri * @throws URISyntaxException if the URI is somehow malformed * @see VirtualFile#asDirectoryURI() * @see VirtualFile#asFileURI() */ public URI toURI() throws URISyntaxException { return VFSUtils.getVirtualURI(this); }
@Override public String getSystemId() { try { return VFSUtils.getVirtualURI(file).toString(); } catch (Exception e) { throw new RuntimeException(e); } }
final URI uri = getVirtualURI(file); final String scheme = uri.getScheme(); return AccessController.doPrivileged(new PrivilegedExceptionAction<URL>() {