예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * @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);
     });
 }
예제 #3
0
 /**
  * @param string $filename
  * @param FilesystemInterface $filesystem
  */
 public function __construct($filename, FilesystemInterface $filesystem)
 {
     $this->filesystem = $filesystem;
     $this->adapter = $filesystem->getAdapter();
     $this->createNameNParentFromFilename($filename);
 }