public function makeDir($path) { if (is_dir($path)) { throw new FileAlreadyExists(); } mkdir($path, 0777, true); }