2.4.0 • Published 7 years ago

fs-changes v2.4.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

SYNOPSIS

A simple cross platform leveldb backed file system watcher.

DESCRIPTION

Watches the file system recursively, stores a snapshot in leveldb, compares and emits changes in the form of new-line-delimited json. Also emits events for changes made since the process was last run.

USAGE

fsch(1)

Used as a user command.

fsch <path/to/watch> <regex-pattern> [path/to/cache]

fs-changes(3)

Used as a library.

const changes = require('fs-changes')

const opts = {
  pattern: /\.txt$/,
  dir: './files',
  cache: '.cache'
}

changes(opts, events => { // returns `events` after doing initial diff

  events.on('added', path => console.log({ path, type: 'added' }))
  events.on('modified', path => console.log({ path, type: 'modified' }))
  events.on('removed', path => console.log({ path, type: 'removed' }))
}) // returns an instance of levelup
2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.3

7 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.0.1

8 years ago