{
}
public static VirtualFile resolveCachedVirtualFile(URL vfsurl, String relativePath) throws IOException
{
VFS vfs = urlCache.get(vfsurl);
if (vfs == null)
{
vfs = VFS.getVFS(vfsurl);
urlCache.put(vfsurl, vfs);
}
else
{
// if the root of VFS has changed on disk, lets purge it
// this is important for Jar files as we don't want stale jars as the
// root of the VFS (i.e., on redeployment)
if (vfs.getRoot().getHandler().hasBeenModified())
{
vfs = VFS.getVFS(vfsurl);
urlCache.put(vfsurl, vfs);
}
}
return vfs.findChild(relativePath);
}