dirscanner

package module
v0.0.0-...-41c77d9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2014 License: MIT Imports: 5 Imported by: 0

README

dirscanner

This is a simple go library that scans and monitors a direcory recursively. It's by no means finished but provides my needed functionality for the moment being.

It basically scan through a directory folder and then monitors the same for subsequent changes. Look in examples for an usage example.

Documentation

Index

Constants

View Source
const (
	DEBUG   = "DEBUG"
	INFO    = "INFO"
	WARNING = "WARNING"
	ERROR   = "ERROR"
	PANIC   = "PANIC"
)
View Source
const (
	CREATED  = "CREATED"
	MODIFIED = "MODIFIED"
	DELETED  = "DELETED"
	RENAMED  = "RENAMED"
)

Variables

This section is empty.

Functions

func ScanDir

func ScanDir(a_path string, a_fileMsgs chan FileMsg,
	a_events chan Event)

Types

type DirScanner

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

func CreateDirScanner

func CreateDirScanner(a_path string, a_fileMsgs chan FileMsg,
	a_events chan Event) *DirScanner

func (*DirScanner) Start

func (d *DirScanner) Start()

func (*DirScanner) Stop

func (d *DirScanner) Stop()

type Event

type Event struct {
	M_level string
	M_msg   string
	M_err   error
}

type FileMsg

type FileMsg struct {
	M_path      string
	M_name      string
	M_operation string
}

type Monitor

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

func CreateMonitor

func CreateMonitor(a_path string, a_fileMsgs chan FileMsg,
	a_events chan Event) *Monitor

func (*Monitor) Start

func (m *Monitor) Start()

func (*Monitor) Stop

func (m *Monitor) Stop()

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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