% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decode-webr-repl-link.R
\name{preview_webr_link}
\alias{preview_webr_link}
\title{Preview webR REPL link contents without writing files to disk}
\usage{
preview_webr_link(url)
}
\arguments{
\item{url}{Character string containing the webR URL}
}
\value{
A \code{webr_preview} object (a list) with elements including \code{files_data}
(the embedded files), \code{total_files}, \code{total_size}, \code{mode}, \code{version},
\code{flags}, and \code{autorun_files}. Its \code{print()} method accepts \code{show_content}
and \code{max_content_length} to display file bodies.
}
\description{
Decodes a webR URL and returns information about the embedded files
without actually saving them to disk. Use print method options to control display.
}
\examples{
url <- as.character(webr_repl_link("plot(1:10)"))

# Inspect a link without writing anything to disk
preview <- preview_webr_link(url)

# Default print (no content)
print(preview)

# Show file contents
print(preview, show_content = TRUE)

# Show file contents with custom length limit
print(preview, show_content = TRUE, max_content_length = 200)

# Access the preview data
preview$files_data
preview$total_files

}
\seealso{
\code{\link[=decode_webr_link]{decode_webr_link()}} to extract the embedded files to disk once you
are happy with the preview.
}
