directory = Brizy_Admin_Guafrette_Path::normalize($directory); if (is_link($this->directory)) { $this->directory = realpath($this->directory); } $this->create = $create; $this->mode = $mode; } protected function normalizePath($path) { $path = Brizy_Admin_Guafrette_Path::normalize($path); if (0 !== strpos($path, $this->directory)) { throw new \OutOfBoundsException(sprintf('The path "%s" is out of the filesystem.', $path)); } return $path; } }