Skip to content

ReadFile

观察一个文件是否改变

API

Return

  • Promise
参数说明类型描述
data文件是否被改变booleantrue 文件改变 false 文件没变

Options

参数说明类型默认值
path文件路径,需要监听的文件stringundefined
interval监听文件改变的时间,单位毫秒。number20

Example

Released under the MIT License.