# GetFileNameWithContent

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`AspireStore`](/reference/api/go/aspire.hosting/aspirestore.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Gets a deterministic file path that is a copy of the `sourceFilename`. The resulting file name will depend on the content of the file.

## Definition

```go
func (AspireStore) GetFileNameWithContent(
    filenameTemplate string,
    sourceFilename string,
) (string, error)
```

## Parameters

- `filenameTemplate` (`string`) -- A file name to base the result on.
- `sourceFilename` (`string`) -- An existing file.

## Returns

`(string, error)` -- A deterministic file path with the same content as `sourceFilename`.

Returns `(string, error)`.

## Applies to

- [`AspireStore`](/reference/api/go/aspire.hosting/aspirestore.md)
