R/write_htpasswd_file.R

Defines functions write_htpasswd_file

write_htpasswd_file <- function(x, file, header=FALSE) {
  utils::write.table(x = x, file = file,
                     quote = FALSE, sep = ":",
                     col.names = if(isTRUE(header)) c("username", "password") else FALSE,
                     row.names = FALSE,
                     fileEncoding = "UTF-8")

}

Try the saros.base package in your browser

Any scripts or data that you put into this service are public.

saros.base documentation built on June 8, 2025, 10:03 a.m.