observey

2019-06-20 admin

observey是什么

什么是observey,A file/folder system observer/watcher

observey使用教程帮助文档

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-67752.html

文章标题:observey

回到顶部