Nothing Particularly Magnificent
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

observey

2.0.0 • Public • Published

Observey

A file/folder system observer/watcher

Overview

Watches and observes files and folders.

Example

const Observey = require('observey');
 
const observer = new Observey({
    path: '/path/to/file/or/folder'
});
 
observer.on('change', function (path) {
    console.log(`change: ${path}`);
});
 
await observer.open();

API

Observey

Creates and returns a Observey class.

  • options: Object

    • path: String Path to file or folder
  • on: Function Emitter

    • error: String Event emitted on error
    • add: String Event emitted on file/folder addtion
    • change: String Event emitted on file/folder change
    • remove: String Event emitted on file/folder removal
    • modify: String Event emitted on file/folder modification (add, change, remove)

Authors

AlexanderElias

License

Why You Should Choose MPL-2.0 This project is licensed under the MPL-2.0 License

install

npm i observey

Downloadsweekly downloads

5

version

2.0.0

license

MPL-2.0

repository

githubgithub

last publish

collaborators

  • avatar