cyverse / gocommands

iRODS Command-line Tools written in Go
Other
29 stars 18 forks source link

Skip if file exists (do not ask option) for automatic retrieval #37

Closed jjkoehorst closed 3 months ago

jjkoehorst commented 3 months ago

For automatic download retrieval is there a way to have a skip already exists option or force download if file size does not match but if it does match skip?

https://github.com/cyverse/gocommands/blob/d06587740afafd51b5bf5f78eaa5fae37e074cf1/cmd/subcmd/get.go#L357

jjkoehorst commented 3 months ago

Testing to see if gocmd sync might actually be what we need.

iychoi commented 3 months ago

There's -f flag to try.

jjkoehorst commented 3 months ago

Will try when I get behind my laptop. Does that not force download? As sometimes you want to skip the download when it exists in some form.

iychoi commented 3 months ago

If your purpose is skip downloading the same file that already exists at local, --diff and --no_hash will compare file size and skip. gocmd sync also uses the same feature internally.

jjkoehorst commented 3 months ago

--diff Transfer files with different content d'oh... think I need to buy some reading glasses. Thanks!