Пример #1
0
        private void CreateDirectoryWithLongPath(string root, IMutableFileSystem fileSystem)
        {
            const int MaxPath = 260;

            // Create root/0001/.../00XX.
            int    i       = 0;
            string current = root;

            while (true)
            {
                current = Path.Combine(current, i.ToString("D4"));
                var path = AbsolutePath.Create(fileSystem.GetPathTable(), current);
                fileSystem.CreateDirectory(path);

                if (current.Length > MaxPath)
                {
                    return;
                }
            }
        }