% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{.prefixedPath}
\alias{.prefixedPath}
\title{Build an intermediate output path by prefixing only the basename.}
\usage{
.prefixedPath(prefix, path)
}
\arguments{
\item{prefix}{Character scalar prepended to the basename.}

\item{path}{Output file path supplied by the caller.}
}
\value{
Character scalar.
}
\description{
Naive `paste0(prefix, output_file_name)` corrupts paths that contain a
directory (`subdir/out.csv` → `topN_subdir/out.csv`,
`/tmp/out.csv` → `topN_/tmp/out.csv`). Splitting via dirname/basename keeps
the directory component intact so intermediate files land beside the final
output.
}
\keyword{internal}
