| [news.eclipse.modeling] Re: How to make sure that a resource is written |
Roland,
Hi Ed
I think the exists() is working properly. When I omit the while-loop and call resource.save() only once, I get an IOException when I try to read the resource. It really does not exists for a short amount of time.
java.io.IOException: Archive entry not found archive:file://home/rbrand/model.zip!/semantic.xmi
at org.eclipse.emf.common.archive.ArchiveURLConnection.getInputStream(ArchiveURLConnection.java:244)
at org.eclipse.emf.ecore.resource.impl.ArchiveURIHandlerImpl.createInputStream(ArchiveURIHandlerImpl.java:59)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:301)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1254)
Stepping into the resource.save() I could see that the OutputStream is closed. But nevertheless it seems not to be written to disk directly. Could there be OS caches? Is there a possiblity to flush the Zipfile?