Jarves\File\FileInfo::setMountPoint PHP Method

setMountPoint() public method

public setMountPoint ( boolean $mountPoint )
$mountPoint boolean
    public function setMountPoint($mountPoint)
    {
        $this->mountPoint = $mountPoint;
    }

Usage Example

Example #1
0
 /**
  * @param string $path
  * @return \Jarves\Model\File[]
  */
 public function getFiles($path)
 {
     $items = parent::getFiles($path);
     $fs = $this->getAdapter($path);
     if ($fs->getMountPath()) {
         foreach ($items as &$file) {
             $file->setMountPoint($fs->getMountPath());
         }
     }
     if ('/' === $path) {
         foreach ($this->jarvesConfig->getSystemConfig()->getMountPoints() as $mountPoint) {
             $fileInfo = new FileInfo();
             $fileInfo->setPath('/' . $mountPoint->getPath());
             //                $fileInfo->setIcon($mountPoint->getIcon());
             $fileInfo->setType(FileInfo::DIR);
             $fileInfo->setMountPoint(true);
             array_unshift($items, $fileInfo);
         }
     }
     return $this->wrap($items);
 }