Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to overcome PathTooLongException?

So I am writing a program that will scan for duplicate files on a computer as the programs that I've seen are really slow, and/or memory hogs, but I was running into a PathTooLongException when I tried to the whole drive. After reading PathTooLongException in C# code I became curious about the following two questions.

  1. Would it hurt my performance if I were to switch my current directory every time I changed levels?

  2. Is there a better way to get the directory structure of all the files (perhaps by calling something like tree.exe and then parsing that)?

like image 334
soandos Avatar asked Oct 10 '22 22:10

soandos


1 Answers

See this Library!

.NET Base Class Libraries : Long Path

like image 90
Writwick Avatar answered Oct 13 '22 14:10

Writwick