id = $id; $this->fileMode = $fileMode; } /** * sets the directory * * @param string $directory */ public function setDirectory($directory) { $this->directory = $directory . DIRECTORY_SEPARATOR . $this->id; if (file_exists($this->directory) === false) { mkdir($this->directory, $this->fileMode, true); } } // more source code here... } ?>