PHP code example of falc / flysystem-local-symlink-plugin
1. Go to this page and download the library: Download falc/flysystem-local-symlink-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
falc / flysystem-local-symlink-plugin example snippets
use Falc\Flysystem\Plugin\Symlink\Local as LocalSymlinkPlugin;
use League\Flysystem\Adapter\Local as LocalAdapter;
use League\Flysystem\Filesystem;
$filesystem = new Filesystem(new LocalAdapter('/'));
use Falc\Flysystem\Plugin\Symlink\Local as LocalSymlinkPlugin;
use League\Flysystem\Adapter\Local as LocalAdapter;
use League\Flysystem\Filesystem;
$filesystem = new Filesystem(new LocalAdapter('/home/falc'));
$filesystem->addPlugin(new LocalSymlinkPlugin\Symlink());
$filesystem->addPlugin(new LocalSymlinkPlugin\IsSymlink());
$filesystem->addPlugin(new LocalSymlinkPlugin\DeleteSymlink());
// Result: /home/falc/flytest -> /home/falc/projects/cli/flytest
$filesystem->symlink('projects/cli/flytest', 'flytest');
// It is possible to check it or delete it in the same way:
$isSymlink = $filesystem->isSymlink('flytest');
$filesystem->deleteSymlink('flytest');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.