public function setFile($file, $fileContent) { $file = $this->cacheDirectory->getRelativePathTo($file); $hash = $this->calcHash($fileContent); if ($this->isDryRun && $this->cache->has($file) && $this->cache->get($file) !== $hash) { $this->cache->clear($file); return; } $this->cache->set($file, $hash); }
/** * @param string $method * @param array $args * @return \React\Promise\Promise */ public function execute($method, $args) { return $this->node->ls()->then(function ($list) use($method, $args) { return $this->iterateNode($list, $method, $args); }); }