Ejemplo n.º 1
0
 /**
  * Validate existing directory
  *
  * @param $value
  * @param array $context
  * @return boolean
  */
 public function validateExistingDirectory($value, array $context = [])
 {
     // get a full path
     if (false !== ($fullPath = $this->model->getUserDirectory($this->path))) {
         if (file_exists($fullPath . '/' . $value)) {
             return !is_dir($fullPath . '/' . $value);
         }
         return true;
     }
     return false;
 }