Closed EOGrady21 closed 2 years ago
Would something like this do the trick? It will return TRUE
if a functioning version of ExifTool (plus, if needed, Perl) is available, and otherwise FALSE
.
is_exiftool_available <- function() {
!is.null(tryCatch(exif_version(), error = function(e) NULL))
}
is_exiftool_available()
If you are not on Windows and using the Windows ExifTool executable, and want to first check whether Perl is available, you could possibly do something like this, which uses the unexported function exiftoolr:::configure_perl()
:
is_perl_available <- function() {
!is.null(tryCatch(exiftoolr:::configure_perl(), error = function(e) NULL))
}
is_perl_available()
That will work perfectly! Thanks so much for your help! 🥇
@EOGrady21 Great. Glad to hear that!
I'm looking to use this package to check some image metadata within a shiny app.
The trick is that I have to make sure the machine running the shiny app has exiftools.
Is there a way to check that exiftool is available before attempting to run exiftoolr functionality?
Thanks!