MCPcopy Index your code
hub / github.com/rclone/rclone / pumpMapToChan

Method pumpMapToChan

fs/sync/sync.go:302–316  ·  view source on GitHub ↗

This reads the map and pumps it into the channel passed in, closing the channel at the end

(files map[string]fs.Object, out chan<- fs.Object)

Source from the content-addressed store, hash-verified

300// This reads the map and pumps it into the channel passed in, closing
301// the channel at the end
302func (s *syncCopyMove) pumpMapToChan(files map[string]fs.Object, out chan<- fs.Object) {
303outer:
304 for _, o := range files {
305 if s.aborting() {
306 break outer
307 }
308 select {
309 case out <- o:
310 case <-s.ctx.Done():
311 break outer
312 }
313 }
314 close(out)
315 s.srcFilesResult <- nil
316}
317
318// This checks the types of errors returned while copying files
319func (s *syncCopyMove) processError(err error) {

Callers 1

makeRenameMapMethod · 0.95

Calls 3

abortingMethod · 0.95
closeFunction · 0.85
DoneMethod · 0.45

Tested by

no test coverage detected