fsevents原语的低级接口

pyfsevents的Python项目详细描述


Introduction

pyfsevents是一个c扩展,为macosx10.5和 稍后允许使用fsevents监视文件系统事件。

pyfsevents使用回调机制:请参见Module Documentation

Installation

python setup.py install

License

根据麻省理工学院的许可条款分发。

Requirements

Mac OS X=10.5豹

Limitations

线程不安全:cfrunloop和python线程的交互不太好 当组合在一起时:)

Module Documentation

pyfsevents使用回调机制。

它提供两个功能:

  • registerfd(fd, callback[, mask])
  • registerpath(path, callback)

注册要监视的对象。

注册后,应该调用listen()以等待事件。 调用被阻止:对事件触发回调。

stop()可用于停止listen()调用。stop()应该被调用 从另一条线。

有关扩展的用例,请参见examples/

callback signatures

传递给register*函数的callback参数将在 事件。这些回调函数应该可以用两个 参数,因为listen将用两个参数调用这些函数:

  • 对于文件描述符,registerfdcallbacks将被传递(fd,mask)参数:

    fd

    file descriptor which changed and fired the callback.

    mask

    the POLLIN / POLLOUT mask, similar to the select.poll module.

  • 对于fsevents,registerpath回调将被传递(path,recursive)参数:

    path

    the path where the event occurred.

    recursive

    a boolean: if True, the caller should check recursively the directory tree for changes, and not only the specified directory.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
SpringMVC中的java,当我遇到旋度时,SpringMVC中出现错误   java如何从设备获取默认ip地址?   plink运行autosys批处理作业并检查其在java中的状态   java Json数组对象通过控制器[Spring Boot]传递到模型   netbeans将java命令行参数传递给插件   java Android AIDL gen文件导致警告?   java JAXB阻止JAXB与共享实体序列化   由@JsonIdentityInfo序列化的对象的java反序列化   postgresql java数组插入postgres   Java圆环碰撞检测   在Java中提取JSON键名   jdk1中的java内存泄漏。7   java Spring 3@Autowired注释问题