This repository has been archived on 2026-07-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
HomeIsWhereTheMoneyIs/vendor/league/flysystem/src/Plugin/ListPaths.php
T
2017-05-24 18:35:30 -05:00

37 lines
669 B
PHP
Executable File

<?php
namespace League\Flysystem\Plugin;
class ListPaths extends AbstractPlugin
{
/**
* Get the method name.
*
* @return string
*/
public function getMethod()
{
return 'listPaths';
}
/**
* List all paths.
*
* @param string $directory
* @param bool $recursive
*
* @return array paths
*/
public function handle($directory = '', $recursive = false)
{
$result = [];
$contents = $this->filesystem->listContents($directory, $recursive);
foreach ($contents as $object) {
$result[] = $object['path'];
}
return $result;
}
}