# FileSource

Describe the source of a file asset.

Used as argument in: [AssetManifestBuilder.addFileAsset](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.AssetManifestBuilder.html#addfileasset)

- Source: [`lib/assets/file-asset.ts`](https://github.com/aws/aws-cdk-cli/blob/HEAD/packages/@aws-cdk/cloud-assembly-schema/lib/assets/file-asset.ts)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const fileSource: cloud_assembly_schema.FileSource = {
  executable: ['executable'],
  packaging: cloud_assembly_schema.FileAssetPackaging.FILE,
  path: 'path',
};
```

Python:

```python
from aws_cdk.cloud_assembly_schema import FileSource
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cloud_assembly_schema

file_source = FileSource(
    executable=["executable"],
    packaging=cloud_assembly_schema.FileAssetPackaging.FILE,
    path="path"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;

FileSource fileSource = FileSource.builder()
        .executable(List.of("executable"))
        .packaging(FileAssetPackaging.FILE)
        .path("path")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Cloud_assembly_schema;

var fileSource = new FileSource {
    Executable = new [] { "executable" },
    Packaging = FileAssetPackaging.FILE,
    Path = "path"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

fileSource := &FileSource{
	Executable: []*string{
		jsii.String("executable"),
	},
	Packaging: awscdk.Cloud_assembly_schema.FileAssetPackaging_FILE,
	Path: jsii.String("path"),
}
```

## Properties

- `executable`: string[] — External command which will produce the file asset to upload.

  **Default:** Exactly one of `executable` and `path` is required.

- `packaging`: [FileAssetPackaging](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileAssetPackaging.html) = FILE — Packaging method.

  Only allowed when `path` is specified.

- `path`: string — The filesystem object to upload.

  **Default:** Exactly one of `executable` and `path` is required.

  This path is relative to the asset manifest location.
