Summary
Expands all environment variables in the provided
DirectoryPath.
- Namespace
- Cake
.Core .IO - Containing Type
- PathExtensions
Syntax
public static DirectoryPath ExpandEnvironmentVariables(this DirectoryPath path, ICakeEnvironment environment)
Examples
var path = new DirectoryPath("%APPDATA%");
var expanded = path.ExpandEnvironmentVariables(environment);
Parameters
| Name | Type | Description |
|---|---|---|
| path | DirectoryPath | The directory to expand. |
| environment | ICakeEnvironment | The environment. |
Return Value
| Type | Description |
|---|---|
| DirectoryPath | A new DirectoryPath with each environment variable replaced by its value. |
