% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write_records.R
\name{write_records}
\alias{write_records}
\title{Write records to file}
\usage{
write_records(
  records,
  file = NULL,
  driver = "GeoJSON",
  dir_out = NULL,
  append = FALSE,
  verbose = TRUE,
  ...
)
}
\arguments{
\item{records}{data.frame, one or multiple records (each represented by one row), as it is 
returned by \link{get_records}.}

\item{file}{character file name or file path of file to be saved. If it is a file name it will be written
at \code{dir_out} in the format of \code{driver}. If it is a file path without valid file extension 
it will be written in the format of \code{driver} at the specified path. If it is a file path with 
valid file extension it will be written there. It can also be a character file name, in this case 
\code{dir_out} has to be provided. If the specified file exists and \code{append == FALSE} the file will be overwritten.
Check for available drivers and extensions through \link{get_records_drivers}.}

\item{driver}{character specifies the writer. Options are all thise returned by
\link{get_records_drivers}. Will be ignored in case a fully qualified \code{file} path is provided. Default is "GeoJSON".}

\item{dir_out}{character. If \code{dir_out} is not NULL the given cloud mask rasters and 
a record file for each record will be saved in \code{dir_out}. If it is NULL, the session 
\code{dir_out} is used.
If no session \code{dir_out} is set through \link{set_archive} an error is thrown.}

\item{append}{logical, if TRUE and a file path is given through \code{file}, the record(s)
will be appended to \code{file} if possible.}

\item{verbose}{logical, if \code{TRUE}, details on the function's progress will be visibile 
on the console. Default is TRUE.}

\item{...}{further arguments to be passed to sf::st_write.}
}
\value{
character file path to saved records.
}
\description{
\code{write_records} writes records. Obtain available formats through \link{get_records_drivers}.
Records can be read through \link{read_records}.
}
\author{
Henrik Fisser, 2020
}
