---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [openshell](../index.md) / writeOpenShellFiles

# Function: writeOpenShellFiles()

> **writeOpenShellFiles**(`setup`, `dir`, `options`): `Promise`\<[`OpenShellFiles`](../interfaces/OpenShellFiles.md)\>

Defined in: [packages/b2c-tooling-sdk/src/openshell/apply.ts:177](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/openshell/apply.ts#L177)

Writes the profiles, policy, Dockerfile, and setup script to `dir`.
An edited policy file is kept unless `force` is set, so edits to it
survive re-runs. A policy that is unchanged since it was generated is
replaced, so changes to the settings (such as the safety level) apply.

## Parameters

### setup

[`OpenShellSetup`](../interfaces/OpenShellSetup.md)

### dir

`string`

### options

[`OpenShellApplyOptions`](../interfaces/OpenShellApplyOptions.md) & `object`

## Returns

`Promise`\<[`OpenShellFiles`](../interfaces/OpenShellFiles.md)\>
