Kraken\Filesystem\FilesystemInterface::exists PHP Method

exists() public method

Check whether a file or directory exist.
public exists ( string $path ) : boolean
$path string
return boolean
    public function exists($path);

Usage Example

コード例 #1
0
 /**
  * Copy data from persistent storage to temporary one.
  *
  * @return mixed
  * @throws ReadException
  */
 private function selectFromStorage()
 {
     if (!$this->fs->exists($this->fsPath)) {
         return $this->getEmptyStorage();
     }
     $data = json_decode($this->fs->read($this->fsPath), true);
     if (!isset($data['pid']) || !$this->system->existsPid($data['pid'])) {
         return $this->getEmptyStorage();
     }
     return $data;
 }
All Usage Examples Of Kraken\Filesystem\FilesystemInterface::exists