/** * @param $path * @param FilesystemInterface $filesystem * @param RecursiveInvoker $recursiveInvoker */ public function __construct($path, FilesystemInterface $filesystem, RecursiveInvoker $recursiveInvoker = null) { $this->filesystem = $filesystem; $this->adapter = $filesystem->getAdapter(); $this->createNameNParentFromFilename($path); $this->recursiveInvoker = $recursiveInvoker; }
/** * @param array $node * @return \React\Promise\PromiseInterface */ public function detect(array $node) { return $this->filesystem->getAdapter()->stat($node['path'])->then(function ($stat) { return $this->walkMapping($stat); }); }
/** * @param string $filename * @param FilesystemInterface $filesystem */ public function __construct($filename, FilesystemInterface $filesystem) { $this->filesystem = $filesystem; $this->adapter = $filesystem->getAdapter(); $this->createNameNParentFromFilename($filename); }