private string CreateTempDirectory() { string tempPath = _fileSystem.GetTempPath(); string newTempPath = _fileSystem.PathCombine(tempPath, Environment.MachineName); _fileSystem.CreateDirectory(newTempPath); return(newTempPath); }
/// <summary> /// Resolved a path relative to the settings file if it is not absolute /// </summary> private string ResolveFolderPath(ChutzpahTestSettingsFile settings, string path, bool createIfNeeded = false) { string relativeLocationPath = Path.Combine(settings.SettingsFileDirectory, path ?? ""); string absoluteFilePath = fileProbe.FindFolderPath(relativeLocationPath); if (createIfNeeded && absoluteFilePath == null) { fileSystem.CreateDirectory(relativeLocationPath); absoluteFilePath = fileProbe.FindFolderPath(relativeLocationPath); } return(absoluteFilePath); }