action

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(port int, bind, dir string)

Server : Serving Static Files with HTTP

func Watcher

func Watcher(name, event, command string, delay int)

Watcher func

Types

type RecursiveWatcher

type RecursiveWatcher struct {
	*fsnotify.Watcher
	*Walker

	TriggerOps    map[fsnotify.Op]bool
	Command       string
	ExecCommandAt time.Time
	Delay         time.Duration
	// contains filtered or unexported fields
}

RecursiveWatcher struct

func NewRecursiveWatcher

func NewRecursiveWatcher(name, command string, ops map[fsnotify.Op]bool, delay time.Duration) (*RecursiveWatcher, error)

NewRecursiveWatcher return a recursive watcher

func (*RecursiveWatcher) AddFolder

func (watcher *RecursiveWatcher) AddFolder(folder string)

AddFolder add folder to recursive watcher

func (*RecursiveWatcher) DelayExecCommand

func (watcher *RecursiveWatcher) DelayExecCommand()

DelayExecCommand delay execute the watcher command

func (*RecursiveWatcher) ExecCommand

func (watcher *RecursiveWatcher) ExecCommand()

ExecCommand execute the command

func (*RecursiveWatcher) Run

func (watcher *RecursiveWatcher) Run()

Run execute the recursive watcher

type Walker

type Walker struct {
	IgnorePrefix string
}

Walker a file path walker

func (*Walker) IgnoreFile

func (walker *Walker) IgnoreFile(name string) bool

IgnoreFile determines if a file should be ignored.

func (*Walker) Subfolders

func (walker *Walker) Subfolders(path string) (paths []string)

Subfolders returns a slice of subfolders (recursive), including the folder provided.

Jump to

Keyboard shortcuts

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