README.md
# polly
[](https://hex.pm/packages/polly)
[](https://hexdocs.pm/polly/)
Polly is a portable, polling file-system watcher, supporting the Erlang and Node.js target.
While she may not be the fastest, she will help you in all situations where the [fs package](https://hex.pm/packages/fs) might not be suitable or supported.
```sh
gleam add polly@1
```
```gleam
import gleam/io
import polly
pub fn main() {
polly.new()
|> polly.add_dir("src")
|> polly.interval(1000)
|> polly.watch(fn(event) {
case event {
Changed(path) -> io.println("CHANGED " <> path)
Created(path) -> io.println("CREATED " <> path)
Deleted(path) -> io.println("DELETED " <> path)
}
})
}
```
Further documentation can be found at <https://hexdocs.pm/polly>.