# File

> Resource File in pulumi-local.

<!-- Generated from the pulumi-local SDK. -->

Resource File in pulumi-local.

Pulumi type: `local:index/file:File`.

`name` is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as local from "pulumi-local"

const resource = new local.File("file", {
  filename: "<filename>",
})
```

## Arguments

| Property              | Type     | Required | Description                                                                                                                                                                                                                                                                                                                  |
| --------------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `content`             | `string` | no       | Content to store in the file, expected to be a UTF-8 encoded string. Conflicts with `sensitiveContent`, `contentBase64` and `source`. Exactly one of these four arguments must be specified.                                                                                                                                 |
| `contentBase64`       | `string` | no       | Content to store in the file, expected to be binary encoded as base64 string. Conflicts with `content`, `sensitiveContent` and `source`. Exactly one of these four arguments must be specified.                                                                                                                              |
| `directoryPermission` | `string` | no       | Permissions to set for directories created (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.                                                                                                                     |
| `filePermission`      | `string` | no       | Permissions to set for the output file (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.                                                                                                                         |
| `filename`            | `string` | yes      | The path to the file that will be created. Missing parent directories will be created. If the file already exists, it will be overridden with the given content.                                                                                                                                                             |
| `sensitiveContent`    | `string` | no       | Sensitive content to store in the file, expected to be an UTF-8 encoded string. Will not be displayed in diffs. Conflicts with `content`, `contentBase64` and `source`. Exactly one of these four arguments must be specified. If in need to use _sensitive_ content, please use the `local.SensitiveFile` resource instead. |
| `source`              | `string` | no       | Path to file to use as source for the one we are creating. Conflicts with `content`, `sensitiveContent` and `contentBase64`. Exactly one of these four arguments must be specified.                                                                                                                                          |

## Outputs

Computed outputs are produced by the provider. They are not constructor arguments.

| Property              | Type     | Computed | Description                                                                                                                                                                                                                                                                                                                  |
| --------------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `content`             | `string` | no       | Content to store in the file, expected to be a UTF-8 encoded string. Conflicts with `sensitiveContent`, `contentBase64` and `source`. Exactly one of these four arguments must be specified.                                                                                                                                 |
| `contentBase64`       | `string` | no       | Content to store in the file, expected to be binary encoded as base64 string. Conflicts with `content`, `sensitiveContent` and `source`. Exactly one of these four arguments must be specified.                                                                                                                              |
| `contentBase64sha256` | `string` | yes      | Base64 encoded SHA256 checksum of file content.                                                                                                                                                                                                                                                                              |
| `contentBase64sha512` | `string` | yes      | Base64 encoded SHA512 checksum of file content.                                                                                                                                                                                                                                                                              |
| `contentMd5`          | `string` | yes      | MD5 checksum of file content.                                                                                                                                                                                                                                                                                                |
| `contentSha1`         | `string` | yes      | SHA1 checksum of file content.                                                                                                                                                                                                                                                                                               |
| `contentSha256`       | `string` | yes      | SHA256 checksum of file content.                                                                                                                                                                                                                                                                                             |
| `contentSha512`       | `string` | yes      | SHA512 checksum of file content.                                                                                                                                                                                                                                                                                             |
| `directoryPermission` | `string` | no       | Permissions to set for directories created (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.                                                                                                                     |
| `filePermission`      | `string` | no       | Permissions to set for the output file (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.                                                                                                                         |
| `filename`            | `string` | no       | The path to the file that will be created. Missing parent directories will be created. If the file already exists, it will be overridden with the given content.                                                                                                                                                             |
| `sensitiveContent`    | `string` | no       | Sensitive content to store in the file, expected to be an UTF-8 encoded string. Will not be displayed in diffs. Conflicts with `content`, `contentBase64` and `source`. Exactly one of these four arguments must be specified. If in need to use _sensitive_ content, please use the `local.SensitiveFile` resource instead. |
| `source`              | `string` | no       | Path to file to use as source for the one we are creating. Conflicts with `content`, `sensitiveContent` and `contentBase64`. Exactly one of these four arguments must be specified.                                                                                                                                          |
