Function to insert a file into the dbfiles table as an input
Usage
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
)Arguments
- in.path
path to the directory containing the file to be inserted
- in.prefix
initial portion of the filename that does not vary by date. Does not include directory; specify that as part of in.path
- siteid
the id of the site that this data is applicable to
- startdate
the start date of the data stored in the file
- enddate
the end date of the data stored in the file
- mimetype
the mime-type of the file
- formatname
the name of the format to distinguish between simmilair mime-types
- parentid
the id of the parent of the input
- con
database connection object
- hostname
the name of the host where the file is stored, this will default to the name of the current machine
- allow.conflicting.dates
Whether to allow a new input record with same siteid, name, and format but different start/end dates
- ens
In case of ensembles we could let to have more than one file associated with one input.