2017 © Pedro Peláez
 

library file-tracker

Track files for changes.

image

tomzx/file-tracker

Track files for changes.

  • Sunday, January 24, 2016
  • by tomzx
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

File Tracker

License Latest Stable Version Latest Unstable Version Build Status Code Quality Code Coverage Total Downloads, (*1)

Track files for changes., (*2)

Getting started

<?php

require_once 'vendor/autoload.php';

$bomFilename = '.bom.json';
$tracker = new \tomzx\FileTracker\Tracker($bomFilename);

$files = 'README.md';
if ($tracker->hasChanged($files)) {
    echo 'README changed!' . PHP_EOL;
}

// Update the hash of the given files
$tracker->track($files);

$files = ['composer.json', 'composer.lock'];
if ($tracker->hasChanged($files)) {
    echo 'Run composer!' . PHP_EOL;
}

// Update the hash of the given files
$tracker->track($files);

// Store the latest hash in .bom.json
$tracker->save();

$files = ['.gitignore'];
$changes = $tracker->changedFiles($files);
if ($changes) {
    echo 'Gitignore was changed' . PHP_EOL;
}

// Only update the hash of .gitignore if it changed
$tracker->track(array_keys($changes));

License

The code is licensed under the MIT license. See LICENSE., (*3)

The Versions

24/01 2016

dev-master

9999999-dev https://github.com/tomzx/file-tracker

Track files for changes.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

file tracker changes

24/01 2016

v0.1.0

0.1.0.0 https://github.com/tomzx/file-tracker

Track files for changes.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

file tracker changes