% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasus_catalog.R
\name{datasus_build_path}
\alias{datasus_build_path}
\title{Build DATASUS FTP paths from filters}
\usage{
datasus_build_path(
  source,
  file_type,
  year = NULL,
  month = NULL,
  include_prelim = TRUE
)
}
\arguments{
\item{source}{Source code (e.g. \code{"SIHSUS"}).}

\item{file_type}{File type code (e.g. \code{"RD"}).}

\item{year}{Integer vector of years.}

\item{month}{Integer vector of months.}

\item{include_prelim}{Logical. Include preliminary trees when available
(default \code{TRUE}).}
}
\value{
A tibble with columns \code{source}, \code{file_type}, \code{period}, and \code{path}.
}
\description{
Builds candidate FTP directories for a given source and file type. For
SIH/SIA, the function selects historical vs. current trees by year/month.
For SIM and SINASC, preliminary trees are included when requested.
}
\examples{
datasus_build_path(source = "SIHSUS", file_type = "RD", year = 2024, month = 1)
}
