/** * @\Nucleus\IService\EventDispatcher\Listen(eventName="ServiceContainer.postDump") */ public function mirror() { $this->fileSystem->remove(glob($this->rootDirectory . '/*')); foreach ($this->configuration['toMirror'] as $sectionName => $mirrorConfiguration) { $endTarget = isset($mirrorConfiguration['target']) ? $mirrorConfiguration['target'] : $sectionName; $target = $this->rootDirectory . '/' . $endTarget; $source = $mirrorConfiguration['source']; $sourcePath = stream_resolve_include_path($source); $this->fileSystem->mirror($sourcePath, $target, null, array('copy_on_windows' => true, 'delete' => false)); } }
public function delete($name, $namespace = ICacheService::NAMESPACE_DEFAULT) { $key = $this->getFile($name, $namespace); $this->fileSystem->remove(array($key)); }
/** * @\Nucleus\IService\EventDispatcher\Listen(eventName="ServiceContainer.postDump") * * @param ContainerBuilder $containerBuilder */ public function generateDoc(ContainerBuilder $containerBuilder) { $docs = new DocDumper($containerBuilder); $this->fileSystem->dumpFile($this->docFilename, $docs->dump(array())); }
public function exists($path) { return $this->fileSystem->exists($this->rootDirectory . $path); }