Example #1
0
 public function getAll()
 {
     $checkpointDir = $this->locator->getCheckpointDir();
     $content = $this->fsHelper->isDir($checkpointDir) ? $this->fsHelper->scandir($checkpointDir) : [];
     $checkpoints = array_filter($content, function ($dir) {
         return !in_array($dir, ['.', '..']);
     });
     return $checkpoints;
 }
Example #2
0
 /**
  * Get an absolute path to the checkpoint directory by checkpoint Id
  * @param string $checkpointId id of checkpoint
  * @return string
  */
 public function getCheckpointPath($checkpointId)
 {
     return $this->locator->getCheckpointDir() . '/' . $checkpointId;
 }