# `BAM.Source.File`
[🔗](https://github.com/baoulo/bam-elixir/blob/v0.1.0/lib/bam/source/file.ex#L1)

File source.

The descriptor lives in a process linked to the caller. `close/1` is
idempotent across copies of the source struct, which is what lets a
stream and `BAM.close/1` both release the same file. If that process
exits first, it closes the descriptor.

# `t`

```elixir
@type t() :: %BAM.Source.File{
  owner: pid() | nil,
  path: Path.t(),
  size: non_neg_integer()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `open`

```elixir
@spec open(Path.t()) :: {:ok, t()} | {:error, BAM.Error.t()}
```

Opens `path` for reading.

---

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