コード例 #1
0
        private List <string> ListarDetalhesArquivosFTP()
        {
            List <string> listaArquivos = new List <string>();

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

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

            return(listaArquivos);
        }
コード例 #2
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);
        }
コード例 #3
0
        private IList <string> GetListaDetalhesArquivos()
        {
            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.ListarDiretorioDetalhado(this.txtDiretorioFTP.Text.Trim()).ToList <string>();

                return(listaArquivos);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
        private DateTime BuscarDataModificacaoArquivoFTP(string nomeArquivo)
        {
            FTPSimple ftp = new FTPSimple(this.servidorFTP, this.usuarioFTP, this.senhaFTP);

            return(ftp.ObterDataModificacaoArquivo(this.diretorioFTPArquivos, nomeArquivo));
        }
コード例 #5
0
        public void DownloadArquivosFTP(string nomeArquivo)
        {
            FTPSimple ftp = new FTPSimple(this.servidorFTP, this.usuarioFTP, this.senhaFTP);

            ftp.Download(this.diretorioFTPArquivos, nomeArquivo, this.diretorioDestinoDownload);
        }
コード例 #6
0
        public long BuscarTamanhoArquivoFTP(string nomeArquivo)
        {
            FTPSimple ftp = new FTPSimple(this.servidorFTP, this.usuarioFTP, this.senhaFTP);

            return(ftp.ObterTamanhoArquivo(this.diretorioFTPArquivos, nomeArquivo));
        }
コード例 #7
0
        private void DownloadArquivos(string nomeArquivo, string pathDestinoArquivo)
        {
            FTPSimple ftp = new FTPSimple(this.txtIPServidor.Text.Trim(), this.txtUsuario.Text.Trim(), this.txtSenha.Text.Trim());

            ftp.Download(this.txtDiretorioFTP.Text.Trim(), nomeArquivo, pathDestinoArquivo);
        }