rclone/fs/operations
lostheli c8cfa43ccc Add a download flag to hashsum and related commands to force rclone to download and hash files locally
This commit modifies the operations.hashSum function by adding an alternate code path. This code path is triggered by passing downloadFlag = True. When activated, rclone will download files from the remote and hash them locally. downloadFlag = False preserves the existing behavior of using the remote to retrieve the hash.

This commit modifies HashLister to support the new hashSum method as well as consolidating the roles of HashLister, HashListerBase64, Md5sum, and Sha1sum.  The printing of hashes from the function defined in HashLister has been revised to work with --progress.  There are light changes to operations.syncFprintf and cmd.startProgress for this.

The unit test operations_test.TestHashSums is modified to support this change and test the download functionality.

The command functions hashsum, md5sum, sha1sum, and dbhashsum are modified to support this change.  A download flag has been added and an output-file flag has been added.  The output-file flag writes hashes to a file instead of stdout to avoid the need to redirect stdout.
2020-12-27 15:40:44 +00:00
..
check.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
check_test.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
dedupe.go dedupe: add --dedupe-mode list to just list dupes, changing nothing 2020-12-02 16:52:12 +00:00
dedupe_test.go dedupe: add --by-hash to dedupe on hash not file name - fixes #1674 2020-12-02 16:52:12 +00:00
listdirsorted_test.go filter: deglobalise to put filter config into the context #4685 2020-11-27 17:28:42 +00:00
lsjson.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
multithread.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
multithread_test.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
operations.go Add a download flag to hashsum and related commands to force rclone to download and hash files locally 2020-12-27 15:40:44 +00:00
operations_internal_test.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
operations_test.go Add a download flag to hashsum and related commands to force rclone to download and hash files locally 2020-12-27 15:40:44 +00:00
rc.go fs: Add context to NewFs #3257 #4685 2020-11-09 18:05:54 +00:00
rc_test.go fs: add context.Context to fs.GetModifyWindow #3257 #4685 2020-11-09 18:05:54 +00:00
reopen.go fs: add UploadHeaders, DownloadHeaders to Update/Put/Open options 2020-04-23 11:07:21 +01:00
reopen_test.go doc: fix typos throughout docs and code 2020-05-20 15:54:51 +01:00