internal static void CreateDirRecursiveRemote(MultiThreadedRunner <State> inst, AdlsClient client, string path, int recursLevel, int noDirEntries, int lowFileEntries, int highFileEntries, int lowStringLength, int highStringLength, bool keepBottomLevelFolderEmpty = false, string filePrefix = "", string nonRandomText = "")
        {
            client.CreateDirectory(path);
            if (recursLevel == 0 && keepBottomLevelFolderEmpty)
            {
                return;
            }
            string[] str           = path.Split('/');
            char     nextLevel     = str[str.Length - 1][0];
            int      noFileEntries = Random.Next(lowFileEntries, highFileEntries);

            for (int i = 0; i < noFileEntries; i++)
            {
                long stringLength = (Random.Next(lowStringLength, highStringLength));
                inst.AddToQueue(new State(path + "/" + nextLevel + filePrefix + i + "File.txt", stringLength, false,
                                          false, client, nonRandomText));
            }
            if (recursLevel == 0)
            {
                return;
            }
            nextLevel++;
            string newPath = path + "/";

            for (int i = 0; i < noDirEntries; i++)
            {
                CreateDirRecursiveRemote(inst, client, newPath + nextLevel + i, recursLevel - 1, noDirEntries, lowFileEntries, highFileEntries, lowStringLength, highStringLength, keepBottomLevelFolderEmpty, filePrefix);
            }
        }
        internal static void CreateDirRecursiveLocal(string path, int recursLevel, int noDirEntries, int lowFileEntries, int highFileEntries, int lowStringLength, int highStringLength, string filePrefix = "", bool writeInNewLines = false)
        {
            MultiThreadedRunner <State> inst = new MultiThreadedRunner <State>(6, Run);

            CreateDirRecursiveLocal(inst, path, recursLevel, noDirEntries, lowFileEntries, highFileEntries,
                                    lowStringLength, highStringLength, filePrefix, writeInNewLines);
            inst.RunMultiThreaded();
            inst.StopMultiThreaded();
        }
        internal static void CreateDirRecursiveRemote(AdlsClient client, string path, int recursLevel, int noDirEntries,
                                                      int lowFileEntries, int highFileEntries, int lowStringLength, int highStringLength,
                                                      bool keepBottomLevelFolderEmpty = false, string filePrefix = "", int numThreads = 6, string nonRandomText = "")
        {
            MultiThreadedRunner <State> inst = new MultiThreadedRunner <State>(numThreads, Run);

            CreateDirRecursiveRemote(inst, client, path, recursLevel, noDirEntries, lowFileEntries, highFileEntries,
                                     lowStringLength, highStringLength, keepBottomLevelFolderEmpty, filePrefix, nonRandomText);
            inst.RunMultiThreaded();
            inst.StopMultiThreaded();
        }
        internal static void CreateDirRecursiveLocal(MultiThreadedRunner <State> inst, string path, int recursLevel, int noDirEntries, int lowFileEntries, int highFileEntries, int lowStringLength, int highStringLength, string filePrefix = "", bool writeInNewLines = false)
        {
            Directory.CreateDirectory(path);
            if (recursLevel == 0)
            {
                return;
            }
            string[] str           = path.Split('\\');
            char     nextLevel     = str[str.Length - 1][0];
            int      noFileEntries = Random.Next(lowFileEntries, highFileEntries);

            for (int i = 0; i < noFileEntries; i++)
            {
                int stringLength = (Random.Next(lowStringLength, highStringLength));
                inst.AddToQueue(new State(path + "\\" + nextLevel + filePrefix + i + "File.txt", stringLength, writeInNewLines));
            }
            nextLevel++;
            string newPath = path + "\\";

            for (int i = 0; i < noDirEntries; i++)
            {
                CreateDirRecursiveLocal(inst, newPath + nextLevel + i, recursLevel - 1, noDirEntries, lowFileEntries, highFileEntries, lowStringLength, highStringLength, filePrefix, writeInNewLines);
            }
        }