承接 crodas/watch-files 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

crodas/watch-files

Composer 安装命令:

composer require crodas/watch-files

包简介

Watch files and directories for changes

README 文档

README

Stateless way of watching files and directory for changes.

It is useful when you compile files, and you would like a simple and efficient way of watching files and directories for changes to avoid re-compilation.

How to install

You can install it using composer.

composer require crodas/watch-files *

How to use it

require "vendor/autoload.php";

use WatchFiles\Watch;

// we'd like to watch some files
// and to save its state in foobar.php
$foobar = new Watch("foobar.php");
if ($foobar->isWatching()) {
  if (!$foobar->hasChanged()) {
    // somebody else before us started watching files/dirs
    // on foobar.php and *nothing* changed since last 
    // time
    return;
  }
  // do heavy stuff here (Recompile it?)
  // we need to tell the watch that we're aware of lastest
  // changes and we'd like to update the file modification time
  $foobar->rebuild();
  return;
}

// we'd love to see when a new file has been added or deleted
$foobar->watchDir("foodir");
$foobar->watchDirs(array("foodir", 'foobar'));

// or monitor changes inside file or files
$foobar->watchFile("foodir.php");
$foobar->watchFiles(array("foodir.php", 'foobar.php'));

// start watching!
$foobar->watch();

统计信息

  • 总下载量: 5.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 2
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2013-04-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固