mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-05-17 05:18:23 -04:00
Include Vendor
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user