R/load_hook.R

Defines functions .onAttach .onLoad

# .onLoad hook for when namespace is loaded
.onLoad <- function(libname, pkgname) {
  configure_exiftool(quiet = TRUE, install_url = TRUE)
}

# .onAttach for library(exifr)
.onAttach <- function(libname, pkgname) {
  version <- try(exiftool_version(), silent = TRUE)
  if(!inherits(version, "try-error")) {
    packageStartupMessage("Using ExifTool version ", version)
  } else {
    # there are already a bunch of warnings as a result of the failed
    # configuration
  }
}

Try the exifr package in your browser

Any scripts or data that you put into this service are public.

exifr documentation built on March 21, 2021, 1:06 a.m.