Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions dandi/cli/cmd_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@
"--existing",
type=click.Choice(list(DownloadExisting)),
# TODO: verify-reupload (to become default)
help="What to do if a file found existing locally. 'refresh': verify "
"that according to the size and mtime, it is the same file, if not - "
"download and overwrite.",
help="How to handle paths that already exist locally. "
"For 'error', if the local file exists, display an error and skip downloading that asset. "
"For 'skip', if the local file exists, skip downloading that asset. "
"For 'overwrite', if the local file exists, overwrite that asset. "
"For 'overwrite-different', if the local file's hash is the same as on the server, the asset "
"is skipped; otherwise, it is redownloaded. "
"For 'refresh', if the local file's size and mtime are the same as on the server, the asset "
"is skipped; otherwise, it is redownloaded.",
default="error",
show_default=True,
)
Expand Down
9 changes: 9 additions & 0 deletions docs/source/cmdline/download.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Options

How to handle paths that already exist locally [default: ``error``]

For ``error``, if the local file exists, display an error and skip downloading that asset.

For ``skip``, if the local file exists, skip downloading that asset.

For ``overwrite``, if the local file exists, overwrite that asset.

For ``overwrite-different``, if the local file's hash is the same as on the
server, the asset is skipped; otherwise, it is redownloaded.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed corresponding changes to the code -- docs maintained manually in parallel for such ATM

For ``refresh``, if the local file's size and mtime are the same as on the
server, the asset is skipped; otherwise, it is redownloaded.

Expand Down
Loading