Uploader/Uploader.php
private function isDistant($key)
    {
        /** @noinspection PhpUnusedLocalVariableInspection */
        list($prefix, $args) = $this->mountManager->filterPrefix([$key]);

        /** @var \League\Flysystem\FileSystem $fs */
        $fs = $this->mountManager->getFilesystem($prefix);
        $adapter = $fs->getAdapter();

        // Try reconnection
        if ($adapter instanceof AbstractFtpAdapter) {
            return true;
        }

        return false;
    }
private function isDistant($key)
    {
        /** @noinspection PhpUnusedLocalVariableInspection */
        list($prefix, $args) = $this->mountManager->filterPrefix([$key]);

        /** @var \League\Flysystem\FileSystem $fs */
        $fs = $this->mountManager->getFilesystem($prefix);
        $adapter = $fs->getAdapter();

        // Try reconnection
        if ($adapter instanceof AbstractFtpAdapter) {
            return true;
        }

        return false;
    }
Returns whether the key is distant.

@param string $key
@return bool