コード例 #1
0
 /**
  * Get normalize or prefixed path.
  *
  * @param string $path
  *
  * @return string
  */
 protected function getNormalzedOrPrefixedPath(string $path) : string
 {
     if (isset($this->driver)) {
         $prefix = method_exists($this->driver, 'getPathPrefix') ? $this->driver->getPathPrefix() : '';
         return $prefix . $path;
     }
     return self::normalizeDirectorySeparator($path);
 }
コード例 #2
0
ファイル: Mover.php プロジェクト: antoineaugusti/pdfarchiver
 public function __construct(AdapterInterface $local, AdapterInterface $remote)
 {
     // Remember the local root path
     $this->localRootPath = $local->getPathPrefix();
     // Create the local filesystem
     $local = new Filesystem($local);
     $local->addPlugin(new ListWith());
     $this->localFilesystem = $local;
     // The remote filesystem
     $remote = new Filesystem($remote);
     // Create the manager with the local and remote filesystems
     $this->manager = new MountManager(compact('local', 'remote'));
 }