watchfs

package
v0.9.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventPath added in v0.9.5

type EventPath struct {
	Path     string
	Username string
	Dsname   string
}

EventPath stores information about a path that is capable of generating events

type FilesysWatcher

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

FilesysWatcher will watch a set of directory paths, and send messages on a channel for events concerning those paths. These events are: * A new file in one of those paths was created * An existing file was modified / written to * An existing file was deleted * One of the folders being watched was renamed, but that folder is still being watched * One of the folders was removed, which makes it no longer watched TODO(dlong): Folder rename and remove are not supported yet.

func NewFilesysWatcher

func NewFilesysWatcher(ctx context.Context, bus event.Bus) (*FilesysWatcher, error)

NewFilesysWatcher returns a new FilesysWatcher

func (*FilesysWatcher) Watch added in v0.9.10

func (w *FilesysWatcher) Watch(path EventPath)

Watch starts watching an additional path

func (*FilesysWatcher) WatchAllFSIPaths added in v0.9.10

func (w *FilesysWatcher) WatchAllFSIPaths(ctx context.Context, r repo.Repo) error

WatchAllFSIPaths sets up filesystem watchers for all FSI-linked datasets in a given qri repo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL