Documentation

Overview

    Package fswatch watches directory with fsnotify.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Watcher

    type Watcher struct {
    	// contains filtered or unexported fields
    }

      Watcher watches a directory.

      func New

      func New(ctx context.Context, dir string) (*Watcher, error)

        New creates new watcher watching directory. It will close when ctx is cancelled.

        func (*Watcher) Close

        func (w *Watcher) Close() error

          Close stops watcher.

          func (*Watcher) Next

          func (w *Watcher) Next(ctx context.Context) (fsnotify.Event, error)

            Next gets next watched event.

            Source Files