3declare(strict_types=1);
10use League\Flysystem\Adapter\Local;
53 $this->mapConfigLinkToLocalLinks(
$config->getLinkBehaviour()),
55 self::FILE_ACCESS_KEY => [
56 self::PRIVATE_ACCESS_KEY =>
$config->getFileAccessPrivate(),
57 self::PUBLIC_ACCESS_KEY =>
$config->getFileAccessPublic()
59 self::DIRECTORY_ACCESS_KEY => [
60 self::PRIVATE_ACCESS_KEY =>
$config->getDirectoryAccessPrivate(),
61 self::PUBLIC_ACCESS_KEY =>
$config->getDirectoryAccessPublic()
67 $reflection = new \ReflectionObject($adapter);
68 $property = $reflection->getProperty(
"pathSeparator");
69 $property->setAccessible(
true);
70 $property->setValue($adapter,
'/');
75 $adapter->setPathPrefix($adapter->getPathPrefix());
78 $filesystem = new \League\Flysystem\Filesystem($adapter);
101 switch ($configLinkBehaviour) {
103 return Local::DISALLOW_LINKS;
105 return Local::SKIP_LINKS;
107 throw new \InvalidArgumentException(
"The supplied value \"$configLinkBehaviour\" is not a valid LocalConfig link behaviour constant.");
126 if ($code === LOCK_EX || $code === LOCK_SH) {
130 throw new \InvalidArgumentException(
"The supplied value \"$code\" is not a valid file lock mode please check your local file storage configurations.");
const SKIP_LINKS
Skip encountered links.
const DISALLOW_LINKS
This is the default behaviour because links violate the root filesystem constraint.
Class FlySystemDirectoryAccess.
Class FlySystemFileAccess.
Class FlySystemFileStreamAccess.
Class FlySystemLocalFilesystemFactory.
const DIRECTORY_ACCESS_KEY
getInstance(LocalConfig $config)
Creates a new instance of the local filesystem adapter used by fly system.
mapConfigLinkToLocalLinks(int $configLinkBehaviour)
Maps a constant of the LocalConfig class into a constant of the Local class.
validateFileLockMode(int $code)
Checks if the supplied file lock mode is valid.
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
Class ChatMainBarProvider \MainMenu\Provider.