> i've one question: How can I delete files, which were downloaded by
> getdown? I thought, if I remove a file from the "getdown.txt", then it
> will be removed by the clients too.
There's no good way for Getdown to know what files in the directory used
to be part of a Getdown distribution but no longer are.
If it used a heuristic, that heuristic might be wrong and we might end up
deleting some critical file from someone's application, which would
obviously be very bad.
So you have to add code to your application to delete obsolete files if
you want them deleted.
> So I have to delete all files, where no counterpart with the name
> "filename.fileending"+v exists? Or is there something else I have to
> notice?
Well, since you're writing the application, you would know when you remove
a file from your Getdown distribution. I'd suggest adding that file to a
list inside your application, and when your app runs, it can go through
the list and ensure that all files on it are deleted.
If you just go deleting every file that doesn't have a "file"v
correspondant, you're going to break things just as badly as Getdown would
if it tried to use that heuristic.
The getdown.txt file has no v version, nor digest.txt, nor any of the log
files, nor the generated proxy.txt or version.txt (for versioned apps)
files. Nor the gettingdown.lock file. Nor any other files placed into your
app's directory by your installer.
You could generate a list of files *not* to delete, but then that won't
help you if Getdown decides to introduce a new control file for some
reason. Your app would delete that file and probably break Getdown.
Just keeping track of the files that you retired from your app would be
safest.
A thought occurs to me. We could add support to Getdown for doing this
cleaning, as long as it remained explicit. For example, if you had a
getdown file that looked like:
...
code = foo.jar
code = bar.jar
resource = foobar.jar
...
and you decided you no longer needed foobar.jar, we could allow you to
change your getdown.txt file thusly:
...
code = foo.jar
code = bar.jar
delete = foobar.jar
...
and Getdown would take care of deleting the retired resource.
This way you don't have to add anything to your application, and Getdown
knows that you want the file in question deleted, so it can safely do so.
Sorry to necro the thread but was this ever implemented?
Looking at the code there is a Resource.erase() method but I cant see anywhere that is being called or processed...
--
You received this message because you are subscribed to the Google Groups "OOO Libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ooo-libs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I got the point. It¨s just another feature that somebody can use while others won't use.Actually I would use it for app. Like local sys admins can deploy more content for users without changing main app and then they could delete them once it's over.
Hi Tomas,
Speaking from experience, the process of getting a pull request incorporated into the mainline code is not too painful, assuming the idea and the implementation are good. If you have an idea for a new feature, I would encourage you to flesh out the details on the mailing list and then submit a pull request. It’s not too hard, you’ll be creating value for yourself, and you’ll be creating value for others as well. Scratch that itch!
Take care,
Daniel
--