Skip to contents

Writes the given pkg_index to PACKAGES.rds (source of truth) and, optionally, to plain PACKAGES and PACKAGES.gz (courtesy outputs).

Usage

pkg_index_write(
  x,
  dir,
  rds_compress = "xz",
  write_plain = TRUE,
  write_gz = TRUE
)

Arguments

x

A pkg_index.

dir

Target directory (e.g., src/contrib).

rds_compress

Compression method passed to saveRDS() (default "xz").

write_plain

Write plain PACKAGES via write.dcf() (default TRUE).

write_gz

Write PACKAGES.gz (default TRUE).

Value

(Invisibly) the number of rows written.

Examples

if (FALSE) { # \dontrun{
idx <- as_pkg_index(data.frame(Package="foo", Version="1.0"))
pkg_index_write(idx, tempdir())
} # }