---
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/2feab01f654eec77c6d702777ec2818472f131f1/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`
