Skip to content

Instantly share code, notes, and snippets.

@PetersonDave
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PetersonDave/022240fbea2eacc1f921 to your computer and use it in GitHub Desktop.
Save PetersonDave/022240fbea2eacc1f921 to your computer and use it in GitHub Desktop.
public string GetExcludedDirectories()
{
var environment = Sitecore.Azure.Deployments.Environments.Environment.GetEnvironment(Settings.EnvironmentDefinitions.GetEnvironment("Local Emulator"));
var location = environment.GetLocation("localhost");
var farm = location.GetFarm("Delivery01", DeploymentType.ContentDelivery);
var role = farm.WebRole01;
var deployment = role.GetDeployment(DeploymentSlot.Production);
// get values from field "Exclude Directories"
return deployment.FilePathFilter.ExcludeDirectories;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment