---
layout: docs
title: writeFile
id: class.Facebook.HackCodegen._Private.Filesystem.writeFile
docid: class.Facebook.HackCodegen._Private.Filesystem.writeFile
permalink: /docs/reference/class.Facebook.HackCodegen._Private.Filesystem.writeFile/
---
# Facebook\\HackCodegen\\_Private\\Filesystem::writeFile()




``` Hack
public static function writeFile(
  string $path,
  string $data,
): void;
```




## Parameters




- ` string $path `
- ` string $data `




## Returns




+ ` void `