file

package
v0.0.0-...-a26ad45 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFileSystemIntegration

type FileFileSystemIntegration struct {
}

Go File system integration for the local file system.

func (*FileFileSystemIntegration) List

func (f *FileFileSystemIntegration) List(u *url.URL) ([]string, error)

Return a list of all files in the directory given in "u".

func (*FileFileSystemIntegration) Open

Open the file pointed to by "u" for reading.

func (*FileFileSystemIntegration) OpenForAppend

func (f *FileFileSystemIntegration) OpenForAppend(u *url.URL) (
	io.WriteCloser, error)

Open the file pointed to by "u" for appending.

func (*FileFileSystemIntegration) OpenForWrite

func (f *FileFileSystemIntegration) OpenForWrite(u *url.URL) (
	io.WriteCloser, error)

Open the file pointed to by "u" for writing.

func (*FileFileSystemIntegration) Remove

func (f *FileFileSystemIntegration) Remove(u *url.URL) error

Remove the specified file from the file system.

func (*FileFileSystemIntegration) Watch

func (f *FileFileSystemIntegration) Watch(
	fileid *url.URL, cb func(string, io.ReadCloser)) (
	file.Watcher, error)

Create a new watcher object for watching for notifications on the given URL.

type FileWatcher

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

Object for watching an individual file for changes.

func NewFileWatcher

func NewFileWatcher(path string, cb func(string, io.ReadCloser)) (
	*FileWatcher, error)

Create a new FileWatcher watching the file at "path".

func (*FileWatcher) ErrChan

func (f *FileWatcher) ErrChan() chan error

Retrieve the error channel associated with the watcher. It will stream a list of all errors created while watching.

func (*FileWatcher) Shutdown

func (f *FileWatcher) Shutdown() error

Stop listening for notifications on the file.

type FileWatcherCreator

type FileWatcherCreator struct {
}

Object for generating watchers for individual files.

func (*FileWatcherCreator) Watch

func (f *FileWatcherCreator) Watch(
	fileid *url.URL, cb func(string, io.ReadCloser)) (
	file.Watcher, error)

Create a new watcher object for watching for notifications on the given URL.

Jump to

Keyboard shortcuts

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