% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fetch.R
\name{fetch_tree}
\alias{fetch_tree}
\title{Print a remote RAP directory tree}
\usage{
fetch_tree(path = ".", max_depth = 2, verbose = TRUE)
}
\arguments{
\item{path}{(character) Remote root path. Default: \code{"."} (project
root). Both \code{"Bulk/"} and \code{"/Bulk/"} are accepted.}

\item{max_depth}{(integer) Maximum recursion depth. Default: \code{2}.}

\item{verbose}{(logical) Whether to print the tree to the console.
Default: \code{TRUE}.}
}
\value{
Invisibly returns a character vector of tree lines.
}
\description{
Displays the remote directory structure in a tree-like format by
recursively listing sub-folders up to \code{max_depth}. Analogous to
\code{file_tree()} but for remote project storage.
}
\section{Warning}{

Each level of recursion triggers one HTTPS API call per folder. Deep trees
(e.g. \code{max_depth > 3}) on large UKB projects may issue 100+ network
requests, causing the console to hang for tens of seconds or time out.
Keep \code{max_depth} at 2-3 for interactive use.
}

\examples{
\dontrun{
fetch_tree()
fetch_tree("Bulk/", max_depth = 2)
fetch_tree(verbose = FALSE)
}
}
