---
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:207](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/scaffold/sources.ts#L207)

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`
