Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Resource Copy of newer resource version
Resource Copy of newer resource version [message #1742759] Wed, 07 September 2016 13:33 Go to next message
Max Bureck is currently offline Max BureckFriend
Messages: 19
Registered: April 2013
Junior Member
Hi,

I am trying to use a "Resource Copy" in a way that it copies the source resource, every time that the source resource has a newer time stamp than the target resource. Thereby, the target resource gets replaced, if present.
I guess the current semantics is that the source resource will be copied, when the target resource does not exist.

Would it be possible to implement a "copy if newer" mode? This is probably not that easy to implement for non-local resources (the resources are referenced via URLs). For my use case it would actually suffice to have this mode for local resources only.

Thanks,
Max
Re: Resource Copy of newer resource version [message #1742795 is a reply to message #1742759] Wed, 07 September 2016 15:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Yes, it only copies if the target doesn't exist. By the time one checks the timestamp of a remote resource, it's probably not that much slower just to always copy it.

A different approach would be to use a copy task to create the initial one and use a resource modify task to change it after the fact. But that means keeping the content you want for the resource in the task itself.

It wouldn't be hard to add a "forceOverwrite" flag to always copy, but time stamp checking of remote resource during isNeeded wouldn't be so nice. That has to perform very fast...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Resource Copy of newer resource version [message #1742898 is a reply to message #1742795] Thu, 08 September 2016 13:00 Go to previous messageGo to next message
Max Bureck is currently offline Max BureckFriend
Messages: 19
Registered: April 2013
Junior Member
A "forceOverwrite" flag would do the trick as well. These files are not huge, so copying does not need to be that smart to prevent long disk I/O operations.
Re: Resource Copy of newer resource version [message #1742903 is a reply to message #1742898] Thu, 08 September 2016 13:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Please open a Bugzilla enhancement request.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Resource Copy of newer resource version [message #1742935 is a reply to message #1742903] Thu, 08 September 2016 16:05 Go to previous message
Max Bureck is currently offline Max BureckFriend
Messages: 19
Registered: April 2013
Junior Member
If someone is interested in the progress, the bug entry is available here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501085
Previous Topic:XML BLOB management
Next Topic:Creating checkstyle configuration file
Goto Forum:
  


Current Time: Thu Sep 19 18:56:09 GMT 2024

Powered by FUDForum. Page generated in 0.03417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top