# FileMode

> Represents the write modes that a provider manifest assigns to destinations.

[API reference](/docs/api/index.md) › [Scaffold](/docs/extensions/scaffold/reference/index.md) › [Manifest](/docs/extensions/scaffold/reference/manifest/index.md) › FileMode

| enum | `PHPForge\Scaffold\Manifest\FileMode` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Manifest/FileMode.php`](https://github.com/php-forge/scaffold/blob/main/src/Manifest/FileMode.php#L10) |

Represents the write modes that a provider manifest assigns to destinations.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-Append"></span>`Append` | `'append'` | Merges the provider entries missing from the destination on every run, creating the destination when missing. |
| <span id="case-Prepend"></span>`Prepend` | `'prepend'` | Prepends the provider block on every run unless the destination already contains it. |
| <span id="case-Preserve"></span>`Preserve` | `'preserve'` | Writes the destination only when it is missing; only `reapply --force` overwrites an existing file. |
| <span id="case-Replace"></span>`Replace` | `'replace'` | Overwrites the destination unless it changed since its recorded hash or was adopted from an existing file. |