Function to insert a file into the dbfiles table

dbfile.insert(in.path, in.prefix, type, id, con, reuse = TRUE,
  hostname = PEcAn.remote::fqdn())

Arguments

in.path

Path to file directory

in.prefix

Filename prefix (not including directory)

type

One of "Model", "Posterior", "Input"

id

container_id of the input to be modified

con

database connection object

reuse

logical: If a record already exists, use it or create a new one?

hostname

the name of the host where the file is stored, this will default to the name of the current machine

Value

id of the file that is written

Details

This will write into the dbfiles and machines the required data to store the file

Examples

# NOT RUN {
  dbfile.insert('somefile.txt', 'Input', 7, dbcon)
# }