diff --git a/ftpActions.go b/ftpActions.go index 0125b0e..538f53f 100644 --- a/ftpActions.go +++ b/ftpActions.go @@ -1,7 +1,9 @@ package paxan import ( + "fmt" "io" + "log" "os" "path/filepath" "time" @@ -28,6 +30,8 @@ func DownloadFTP(user string, password string, path string) error { return err } + fmt.Printf("%v", files) + for _, file := range files { res, err := c.Retr(file.Name) if err != nil { @@ -35,6 +39,8 @@ func DownloadFTP(user string, password string, path string) error { } defer res.Close() + log.Printf("Downloading %s", file.Name) + outFile, err := os.Create(filepath.Join(path, file.Name)) if err != nil { return err