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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [scaffold](../index.md) / cartridgePathForDestination

# Function: cartridgePathForDestination()

> **cartridgePathForDestination**(`absolutePath`, `projectRoot`): `string`

Defined in: [packages/b2c-tooling-sdk/src/scaffold/sources.ts:212](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/scaffold/sources.ts#L212)

Path to use for scaffold destination so files are generated under outputDir (e.g. working directory).
Returns a path relative to projectRoot when the cartridge is under projectRoot, so the executor
joins with outputDir instead of ignoring it. Otherwise returns the absolute path.

## Parameters

### absolutePath

`string`

### projectRoot

`string`

## Returns

`string`
