コード例 #1
0
 /**
  * @param $targetDir
  * @param \PhotoOrganize\Domain\Ports\Filesystem $fs
  * @return string
  */
 public function createSymlink($targetDir, Filesystem $fs)
 {
     $dir = $this->getDatePath();
     $fs->mkdir("{$targetDir}/{$dir}");
     $fs->symlink($this->file->getRealPath(), "{$targetDir}/{$this->getSymlinkTarget()}", true);
     return "{$targetDir}/{$this->getSymlinkTarget()}";
 }
コード例 #2
0
 /**
  * @param Path $source original file
  * @param Path $target new file
  */
 public function createLink(Path $source, Path $target)
 {
     $this->fs->symlink($source->getValue(), $target->getValue(), true);
 }