> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# writeFile

```typescript
writeFile(path: string, content: string, append: boolean): string
```

Writes content to a file, returning the absolute path written to.

If the path is relative, it is resolved against the default cache location.
When `append` is true and the file already has content, a newline is
inserted before appending the new content. When `append` is false, the file
is overwritten.

## Parameters

<ResponseField name={"path"} type={"string"} required />

<ResponseField name={"content"} type={"string"} required />

<ResponseField name={"append"} type={"boolean"} required />

## Returns

`string`
