> For the complete documentation index, see [llms.txt](https://venndev.gitbook.io/vapm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://venndev.gitbook.io/vapm/stream/write.md).

# write()

This function makes it possible to write to something in a file and save it asynchronously.

```php
/**
 * @throws Throwable
 *
 * Use this to write to a file.
 */
public static function write(string $path, string $data) : Promise;
```
