ls() public méthode

Retrieve a directories key
public ls ( string $key = '/', boolean $recursive = false ) : array
$key string
$recursive boolean
Résultat array
Exemple #1
0
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $server = $input->getArgument('server');
     $key = $input->getArgument('key');
     $recursive = $input->getOption('recursive');
     $client = new EtcdClient($server);
     $data = $client->ls($key, $recursive);
     $output->writeln($data);
 }
Exemple #2
0
 /**
  * @covers LinkORB\Component\Etcd\Client::ls
  */
 public function testLs()
 {
     $dirs = $this->client->ls();
     $this->assertTrue(in_array($this->dirname, $dirs));
 }