Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download: operations on existing local files #150

Open
myfreeer opened this issue Jan 13, 2021 · 1 comment
Open

download: operations on existing local files #150

myfreeer opened this issue Jan 13, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@myfreeer
Copy link
Member

myfreeer commented Jan 13, 2021

  • processBeforeDownload
    • do nothing (currently default)
    • log or warn
    • mark as shouldBeDiscardedFromDownload
    • skip and return void
  • download
    • do nothing (currently default)
    • log or warn
    • request newer version with If-Modified-Since and check Last-Modified
    • read from disk
    • read from disk if not newer than remote
    • discard
    • continue to download if remote is larger, read from disk if else
  • saveToDisk
    • overwrite (currently default)
    • log or warn
    • save if newer by checking Last-Modified
    • save with another name

What about urls with savePath pointing at non-existing files redirected to existing files?
Maybe we can use a bitset containing options and 3 optional life cycle function for this.

@myfreeer myfreeer added the enhancement New feature or request label Jan 17, 2021
@myfreeer
Copy link
Member Author

myfreeer commented Apr 8, 2023

This could be made into a optional life cycle callback, with all conditions passed in and operations as return value, the existance of local file are only detected if the life cycle exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant