private string GetRoot(string id, bool ensureDirectory = true) { string path = Path.Combine(_environment.DeploymentsPath, id); if (ensureDirectory) { return FileSystemHelpers.EnsureDirectory(path); } return path; }