# `Membrane.File.SeekSourceEvent`
[🔗](https://github.com/membraneframework/membrane_file_plugin/blob/v0.17.5/lib/membrane_file/seek_source_event.ex#L1)

Event that triggers seeking and reading in `Membrane.File.Source` working in
`seekable?: true` mode.

When `inspect(__MODULE__)` is received by the source, the source starts reading
data from the given position in file, specified by the `:start` field of the event's
struct. The source reads up to `size_to_read` bytes of the data from file (it can
read less if the file ends).
If the event is set with `last?: true`, once `size_to_read` bytes are read or the
file ends, the source will return `end_of_stream` action on the `:output` pad.

# `offset_t`

```elixir
@type offset_t() :: integer()
```

# `position_t`

```elixir
@type position_t() ::
  offset_t() | {:bof | :cur | :eof, offset_t()} | :bof | :cur | :eof
```

Specifies the position to which the seek is performed.

The meaning is the same as for the `Location` argument in https://www.erlang.org/doc/man/file.html#position-2.

# `t`

```elixir
@type t() :: %Membrane.File.SeekSourceEvent{
  last?: boolean(),
  size_to_read: non_neg_integer() | :infinity,
  start: position_t()
}
```

---

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