---
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:213](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/scaffold/sources.ts#L213)

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`
