stripLeadingSlashes($path); if (is_file($path)) { return $this->escape($path); } if ($path === '') { return ''; } return sprintf('?dir=%s', $this->escape($path)); } }