Example #1
0
 public void UploadDossier(ElementFolder dossierLocal, ElementFolder dossierDistant)
 {
     using (_monFtp = new Ftp())
     {
         _monFtp.Connect(_maConfig.Host, _maConfig.Port);
         _monFtp.Login(_maConfig.Login, _maConfig.MotDePass);
         string resteChemin = MethodesGlobales.GetCheminServerSansRacinne(dossierDistant.GetPath(), _maConfig.GetUriChaine());
         _monFtp.CreateFolder(MethodesGlobales.GetCheminDossierUploadSurServeur(resteChemin, dossierLocal.GetName()));
         LocalSearchOptions uneLocalSearchOption = new LocalSearchOptions("*", true);
         _monFtp.UploadFiles(MethodesGlobales.GetCheminDossierUploadSurServeur(resteChemin, dossierLocal.GetName()), dossierLocal.GetPath(), uneLocalSearchOption);
         _monFtp.Close();
     }
 }