# 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.7.0"}
]
end
```
## Sample usage
Playing below pipeline should copy `/etc/passwd` to `./test`:
```elixir
defmodule FileExamplePipeline do
use Membrane.Pipeline
@doc false
@impl true
def handle_init(_) do
children = [
file_src: %Membrane.File.Source{location: "/etc/passwd"},
file_sink: %Membrane.File.Sink{location: "./test"},
]
links = [link(:file_src) |> to(:file_sink)]
{{:ok, spec: %ParentSpec{children: children, links: links}}, %{}}
end
end
```
## 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)