Microsoft.VsSDK.IntegrationTestLibrary.TestUtils.GetNewDirectoryName C# (CSharp) Method

GetNewDirectoryName() public static method

Returns the first available directory name on the form [baseDirectoryName]i where [i] starts at 1 and increases until there is an available directory name in the given directory. Also creates the directory to mark it as occupied.
public static GetNewDirectoryName ( string directory, string baseDirectoryName ) : string
directory string Directory that the file should live in.
baseDirectoryName string
return string
        public static string GetNewDirectoryName(string directory, string baseDirectoryName)
        {
            // Get the new file name
            string directoryName = GetNewFileOrDirectoryNameWithoutCreatingAnything(directory, baseDirectoryName, null);

            // Create an empty directory to make it as occupied
            Directory.CreateDirectory(directoryName);

            return directoryName;
        }