# 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;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://venndev.gitbook.io/vapm/stream.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
