diff --git a/man/incant.Rd b/man/incant.Rd index 5fff68f..6ee2386 100644 --- a/man/incant.Rd +++ b/man/incant.Rd @@ -4,10 +4,14 @@ \alias{incant} \title{Retrieve 'magic' attributes from files and directories} \usage{ -incant(path) +incant(path, magic_db = NA_character_) } \arguments{ \item{path}{character vector of files to use magic on} + +\item{magic_db}{either \code{NULL} (the default) to use the built-in +\code{magic.mgc} database or an atomic character vector with a +colon-separated list of full paths to custom \code{magic.mgc} database(s).} } \value{ a \code{tibble} / \code{data.frame} of file magic attributes. @@ -27,4 +31,8 @@ system.file("img", package="filemagic") \%>\% incant() \%>\% glimpse() } +\references{ +See \url{http://openpreservation.org/blog/2012/08/09/magic-editing-and-creation-primer/} + for information on how to create your own \code{magic.mgc} databases. +} diff --git a/src/wand.cpp b/src/wand.cpp index 2e3f5dc..3b5a5c6 100644 --- a/src/wand.cpp +++ b/src/wand.cpp @@ -30,6 +30,8 @@ DataFrame incant(CharacterVector path) { StringVector extensions(input_size); StringVector description(input_size); + const char *mtype = NULL; + for (unsigned int i=0; i