定制 azjezz/assess 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

azjezz/assess

最新稳定版本:1.0.2

Composer 安装命令:

composer require azjezz/assess

包简介

Unix filesystem notification library for PHP

README 文档

README

Unix filesystem notifications library for PHP.

Features

  • Watch for file creations, modifications, accesses, changes, moves, and deletions.
  • Configurable polling interval.
  • Filter by file extensions.
  • Optionally watch directories.
  • Easy-to-use event registration.

Installation

You can install the library via Composer:

composer require azjezz/assess

Usage

use Assess\Configuration; use Assess\Event\Event; use Assess\Event\EventType; use Assess\Watcher; use Revolt\EventLoop; $configuration = Configuration::createForDirectories([ '/path/to/directory', '/another/path/to/directory', ]) // poll interval in seconds ->withPollInterval(0.5) // do not watch directories ->withWatchDirectories(false) // include only PHP files ->withExtensions(['php']) ; $watcher = Watcher::create($configuration); $watcher->register(EventType::Created, function (Event $event): void { $node = $event->newIndex->nodes[$event->id]; echo "File created: {$node->path}\n"; }); $watcher->register(EventType::Moved, function (Event $event): void { $oldNode = $event->oldIndex->nodes[$event->id]; $newNode = $event->newIndex->nodes[$event->id]; echo "File moved: {$oldNode->path} -> {$newNode->path}\n"; }); $watcher->register(EventType::Deleted, function (Event $event): void { $node = $event->oldIndex->nodes[$event->id]; echo "File deleted: {$node->path}\n"; }); $watcher->enable(); $watcher->reference(); EventLoop::run();

See examples/command.php for a complete example.

License

This library is licensed under the MIT license. See the LICENSE file for details.

统计信息

  • 总下载量: 6.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 107
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 107
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固