dbfile.input.insert.Rd
Function to insert a file into the dbfiles table as an input
dbfile.input.insert(
in.path,
in.prefix,
siteid,
startdate,
enddate,
mimetype,
formatname,
parentid = NA,
con,
hostname = PEcAn.remote::fqdn(),
allow.conflicting.dates = FALSE,
ens = FALSE
)
path to the directory containing the file to be inserted
initial portion of the filename that does not vary by date. Does not include directory; specify that as part of in.path
the id of the site that this data is applicable to
the start date of the data stored in the file
the end date of the data stored in the file
the mime-type of the file
the name of the format to distinguish between simmilair mime-types
the id of the parent of the input
database connection object
the name of the host where the file is stored, this will default to the name of the current machine
Whether to allow a new input record with same siteid, name, and format but different start/end dates
In case of ensembles we could let to have more than one file associated with one input.
data.frame with the id, filename and pathname of the input that is requested
This will write into the dbfiles, inputs, machines and formats the required data to store the file
if (FALSE) { # \dontrun{
dbfile.input.insert(
in.path = 'trait.data.Rdata',
in.prefix = siteid,
startdate = startdate,
enddate = enddate,
mimetype = 'application/x-RData',
formatname = 'traits',
con = dbcon)
} # }