Laravelista\LumenVendorPublish\VendorPublishCommand::publishDirectory PHP Method

publishDirectory() protected method

Publish the directory to the given directory.
protected publishDirectory ( string $from, string $to ) : void
$from string
$to string
return void
    protected function publishDirectory($from, $to)
    {
        $manager = new MountManager(['from' => new Flysystem(new LocalAdapter($from)), 'to' => new Flysystem(new LocalAdapter($to))]);
        foreach ($manager->listContents('from://', true) as $file) {
            if ($file['type'] === 'file' && (!$manager->has('to://' . $file['path']) || $this->option('force'))) {
                $manager->put('to://' . $file['path'], $manager->read('from://' . $file['path']));
            }
        }
        $this->status($from, $to, 'Directory');
    }