---
layout: docs
title: withRootDir
id: class.Facebook.HackCodegen.HackCodegenConfig.withRootDir
docid: class.Facebook.HackCodegen.HackCodegenConfig.withRootDir
permalink: /docs/reference/class.Facebook.HackCodegen.HackCodegenConfig.withRootDir/
---
# Facebook\\HackCodegen\\HackCodegenConfig::withRootDir()




``` Hack
public function withRootDir(
  string $root,
): this;
```




## Parameters




* ` string $root `




## Returns




- ` this `