---
layout: docs
title: codegenFile
id: interface.Facebook.HackCodegen.ICodegenFactory.codegenFile
docid: interface.Facebook.HackCodegen.ICodegenFactory.codegenFile
permalink: /docs/reference/interface.Facebook.HackCodegen.ICodegenFactory.codegenFile/
---
# Facebook\\HackCodegen\\ICodegenFactory::codegenFile()




Create a file with the specified filename/path




``` Hack
public function codegenFile(
  string $file,
): Facebook\HackCodegen\CodegenFile;
```




## Parameters




- ` string $file `




## Returns




+ [` Facebook\HackCodegen\CodegenFile `](<class.Facebook.HackCodegen.CodegenFile.md>)