public BaseAquivosDataSUS(string servidorFTP, string usuarioFTP, string senhaFTP, string diretorioFTPArquivos, string diretorioDestinoDownload, string diretorioDestinoDBF, string estado, string tipoArquivo) { this.servidorFTP = servidorFTP; this.usuarioFTP = usuarioFTP; this.senhaFTP = senhaFTP; this.diretorioFTPArquivos = diretorioFTPArquivos; this.diretorioDestinoDownload = Path.Combine(diretorioDestinoDownload, tipoArquivo); this.diretorioDestinoDBF = Path.Combine(diretorioDestinoDBF, Constantes.TipoArquivoDBF, tipoArquivo); this.estadoUF = this.BuscarEstadoUFArquivo(estado); this.tipoArquivo = this.BuscarTipoArquivo(tipoArquivo); DirectorioUtil.CriarDiretorio(this.diretorioDestinoDownload); DirectorioUtil.CriarDiretorio(this.diretorioDestinoDBF); }
private bool VerificarConversaoArquivo(string pathDestino, string arquivo) { string arquivoDBF = arquivo.Replace(Constantes.ExtensaoArquivosDBC, Constantes.ExtensaoArquivosDBF).ToUpper(); return(DirectorioUtil.VerificarArquivoExiste(pathDestino, arquivoDBF)); }