Skip to content

download: operations on existing local files #150

@myfreeer

Description

@myfreeer
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions