# `Hyper.SuidHelper.Losetup`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/hyper/suid_helper/losetup.ex#L1)

Loop-device operations, via the setuid helper's `losetup` tool.

# `err`

```elixir
@type err() :: Hyper.SuidHelper.err()
```

# `attach_ro`

```elixir
@spec attach_ro(Path.t()) :: {:ok, Path.t()} | {:error, err()}
```

Attach `path` as a read-only loop-back block device.

# `attach_rw`

```elixir
@spec attach_rw(Path.t()) :: {:ok, Path.t()} | {:error, err()}
```

Attach `path` as a read-write loop-back block device.

# `detach`

```elixir
@spec detach(Path.t()) :: :ok | {:error, err()}
```

Detach the loop block device at `dev`.

# `list`

```elixir
@spec list() :: {:ok, [{Path.t(), Path.t()}]} | {:error, err()}
```

Currently-attached loop devices as `{device, backing_file}` pairs.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
