# Membrane File plugin
[](https://hex.pm/packages/membrane_file_plugin)
[](https://hexdocs.pm/membrane_file_plugin/)
[](https://circleci.com/gh/membraneframework/membrane_file_plugin)
Membrane plugin for reading and writing to files.
It is part of [Membrane Multimedia Framework](https://membraneframework.org).
## Installation
The package can be installed by adding `membrane_file_plugin` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{membrane_file_plugin, "~> 0.13.1"}
]
end
```
## Usage examples
### File.Sink and File.Source
`Source` and `Sink` elements allow reading from and writing to a file, respectively.
The pipeline in `./examples/sink_and_source.exs` will copy the contents of that script to `/tmp/example.exs`
### File.MultiSink
`MultiSink` allows writing to multiple files, with the input being split into parts.
The example in `./examples/sink_multi.exs` will generate 0-filled input file of 1024 bytes (`input.bin`)
and copy first 10-bytes to `/tmp/output0.bin` and the rest to `/tmp/output1.bin`.
## Copyright and License
Copyright 2018, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane)
[](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane)
Licensed under the [Apache License, Version 2.0](LICENSE)