Example #1
0
        public virtual List <string> ListarNomesArquivosFTP()
        {
            List <string> listaArquivos = new List <string>();

            FTPSimple ftp = new FTPSimple(this.servidorFTP, this.usuarioFTP, this.senhaFTP);

            listaArquivos = ftp.ListarDiretorioSimples(this.diretorioFTPArquivos).ToList <string>();

            return(listaArquivos);
        }
        public IList <string> GetListaArquivos()
        {
            IList <string> listaArquivos = new List <string>();

            try
            {
                FTPSimple ftp = new FTPSimple(this.txtIPServidor.Text.Trim(), this.txtUsuario.Text.Trim(), this.txtSenha.Text.Trim());

                listaArquivos = ftp.ListarDiretorioSimples(this.txtDiretorioFTP.Text.Trim()).ToList <string>();

                return(listaArquivos);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }