Function to check to see if a file exists in the dbfiles table as an input

dbfile.input.check(siteid, startdate = NULL, enddate = NULL, mimetype,
  formatname, parentid = NA, con, hostname = PEcAn.remote::fqdn(),
  exact.dates = FALSE, pattern = NULL)

Arguments

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

exact.dates

setting to include start and end date in input query

pattern

text to seach for in the file name (default NULL = no check).

Value

data.frame with the id, filename and pathname of the input that is requested

Details

This will check the dbfiles, inputs, machines and formats tables to see if the file exists

Examples

# NOT RUN {
  dbfile.input.check(siteid, startdate, enddate, 'application/x-RData', 'traits', dbcon)
# }