> 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.md).

# Stream

Slightly different from Javascript or Kotlin, this is a class created to get results from the website as well as to retrieve content from a file without you being afraid of causing performance loss.

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

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

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

/**
 * @throws Throwable
 *
 * Use this to delete a file.
 */
public static function delete(string $path) : Promise;

/**
 * @throws Throwable
 *
 * Use this to create a file.
 */
public static function create(string $path) : Promise;

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