switch fileTransfer.Type {
case FileDownload:
+ s.Stats.DownloadCounter += 1
+
fullFilePath, err := readPath(s.Config.FileRoot, fileTransfer.FilePath, fileTransfer.FileName)
if err != nil {
return err
}
}
case FileUpload:
+ s.Stats.UploadCounter += 1
+
destinationFile := s.Config.FileRoot + ReadFilePath(fileTransfer.FilePath) + "/" + string(fileTransfer.FileName)
var file *os.File
i := 0
err = filepath.Walk(fullFilePath+"/", func(path string, info os.FileInfo, err error) error {
+ s.Stats.DownloadCounter += 1
+
if err != nil {
return err
}
nextAction = dlFldrActionResumeFile
}
- fmt.Printf("Next Action: %v\n", nextAction)
-
if _, err := conn.Write([]byte{0, uint8(nextAction)}); err != nil {
return err
}