Created
August 15, 2018 18:00
-
-
Save mafaca/8e2a638dc289dfe0aefd1dabe3d32772 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//string reallyLongDirectory = @"123\"; | |
string reallyLongDirectory = @"Test\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
reallyLongDirectory = reallyLongDirectory + @"\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
reallyLongDirectory = reallyLongDirectory + @"\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
Console.WriteLine($"Creating a directory that is {reallyLongDirectory.Length} characters long"); | |
string absPath = Path.Combine(reallyLongDirectory, "123"); | |
bool isExists = DirectoryUtils.Exists(absPath); | |
DirectoryUtils.CreateDirectory(absPath); | |
string fileName = string.Empty; | |
for(int i = 0; i < 245; i++) | |
{ | |
fileName += 'a'; | |
} | |
fileName += ".txt"; | |
string filePath = Path.Combine(absPath, fileName); | |
isExists = FileUtils.Exists(filePath); | |
FileUtils.Create(filePath); | |
return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment