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

# IO

Provides input and output facilities related to files.

### Methods <a href="#methods" id="methods"></a>

#### `io.append()` <a href="#ioappend" id="ioappend"></a>

Appends content to the specified file.

```typescript
io.append('./log.txt', 'message from ghost')
```

#### `io.read()` <a href="#ioread" id="ioread"></a>

Reads and returns the contents of the specified file as a string.

```typescript
io.read('./log.txt')
```

#### `io.write()` <a href="#iowrite" id="iowrite"></a>

Writes content to the specified file. This method completely overrides all content.

```typescript
io.write(content, './log.txt')
```
