README.md

# ExDets

This package is just a wrapper of erlang :dets, all functions presents on :dets is present.
So, a :dets and ExDets is interchangeable parts. Look at Examples part.
A new function have been adding, dets_files?/1, look at the doc.

This advantage of the ExDets is that for some returns or inputs of :dets function, ExWrapper converts function returns or inputs of :dets functions from Char lists to String.t and vice versa, recursively in all datastructures. That function is not applied for data in dets table but only to errors messages or some others details.

For the rest, look at the [ErlDoc](http://erlang.org/doc/man/dets.html) for :dets.

## Installation

The package is available on Hex, so visite [Hex](https://hex.pm/packages/exdets). 

The package can be installed
by adding `exdets` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [{:exdets, "~> 0.1.5"}]
end
```

## Documentations

The documentation is available on HexDoc, so visite [HexDoc](https://hexdocs.pm/exdets).

## Examples

### Create a dets file.
```elixir
{:ok, ref} = ExDets.open_file("my_db", [])
```

### Open a dets file.
```elixir
{:ok; ref} = ExDets.open_file("my_db")
```
### Interchangeable

```elixir
{:ok, ref} = :dets.open_file('my_db', [])
:ok = ExDets.insert(ref, {:test, "Yop"})
{:test, "Yop"} = :dets.lookup(ref, :test)
```

### Test multiple dets files
It's an addition of original :dets.

```elixir
bool = ExDets.dets_files?(["f1", "f2", "f3"])
```