---
output: rmarkdown::github_document
---

`wand` : Retrieve 'Magic' Attributes from Files and Directories

The `libmagic` library must be installed and available to use this. The package should also be pretty straightforward to get working on Windows. Assistance to do that is welcome.

The following functions are implemented:

- `incant` : returns the "magic" metadata of the files in the input vector (as a data frame)
- `magic_wand_file` : provides a full path to the package-provided `magic` file

### Installation

```{r eval=FALSE}
devtools::install_github("hrbrmstr/wand")
```

```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
options(width=120)
```

### Usage

```{r message=FALSE}
library(wand)
library(magrittr)
library(dplyr)

system.file("img", package="wand") %>% 
  list.files(full.names=TRUE) %>% 
  incant() %>% 
  glimpse()

system.file("img", package="wand") %>% 
  list.files(full.names=TRUE) %>% 
  incant(magic_wand_file()) %>% 
  select(description) %>% 
  unlist(use.names=FALSE)

# current verison
packageVersion("wand")

```

### Test Results

```{r message=FALSE}
library(wand)
library(testthat)

date()

test_dir("tests/")
```

