# saveContentToFile

**Kind:** Function

**Source:** [`src/helper/ssg/ssg.ts`](https://github.com/honojs/hono/blob/main/src/helper/ssg/ssg.ts#L310)

**Part of:** [Helper](subsystem-src-helper)

## Signature

```ts
async function saveContentToFile(data: Promise<{ routePath: string; content: string | ArrayBuffer; mimeType: string } | undefined>, fsModule: FileSystemModule, outDir: string, extensionMap: Record<string, string>): Promise<string | undefined>
```

## Parameters

| Name | Type |
|---|---|
| `data` | `Promise<{ routePath: string; content: string | ArrayBuffer; mimeType: string } | undefined>` |
| `fsModule` | `FileSystemModule` |
| `outDir` | `string` |
| `extensionMap` | `Record<string, string>` |

**Returns:** `Promise<string | undefined>`
