示例#1
0
 protected function handleFile(FileInterface $file, $path)
 {
     $event = new FileEvent($path);
     $destination = $this->makePath($path);
     $fileTime = is_file($destination) ? filemtime($destination) : 0;
     if ($this->force || $fileTime < $file->getTime()) {
         $this->ensurePathDirectory($destination);
         $file->put($this->styleguide, $destination);
         $event->stop(FileEvent::UPDATED);
     } else {
         $event->stop(FileEvent::SKIPPED);
     }
     return $event;
 }
示例#2
0
 /**
  * Add a file to the style guide
  *
  * @param FileInterface $file A file object
  */
 protected function addFile(FileInterface $file)
 {
     $this->files[$file->getPath()] = $file;
 }