• File: ListPaths.php
  • Full Path: /var/www/crm_set/modules/backup/vendor/league/flysystem/src/Plugin/ListPaths.php
  • Date Modified: 09/21/2026 4:20 AM
  • File size: 669 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?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;
    }
}