% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snapshot.R
\name{find_root}
\alias{find_root}
\title{Find Project Root Directory}
\usage{
find_root(start_path = NULL)
}
\arguments{
\item{start_path}{Optional. The directory to start searching from.
If NULL (default), uses the current working directory or the stored
original working directory if in a sandbox.}
}
\value{
The path to the project root directory.
}
\description{
Finds the root directory of the current R project using various heuristics.
The function searches for markers like \code{_resultcheck.yml} (preferred),
\code{resultcheck.yml} (legacy), \code{.Rproj} files,
or a \code{.git} directory. When running inside a sandbox created by
\code{setup_sandbox()}, it will search from the original working directory.
}
\examples{
with_example({
  root <- find_root()
  print(root)
})
}
