-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
I am attempting to pull down a fairly large file (2 GB).
I took your example and added some logging:
_, err = ftp.Retr(path, func(r io.Reader) error {
var hasher = sha256.New()
fmt.Println("Call copy")
if _, err = io.Copy(hasher, r); err != nil {
return err
}
fmt.Println("after copy")
hash := fmt.Sprintf("%s %x", path, hex.EncodeToString(hasher.Sum(nil)))
fmt.Println(hash)
return nil
But after it logs "Call copy" it sits for quite a while. I assume this is because the file is actually downloading at this point.
I'm wondering if my assumption is correct? If so - is there any way that I can display the download progress periodically while the file is downloading?
Metadata
Metadata
Assignees
Labels
No labels