Created
November 11, 2019 13:06
-
-
Save MarcosCobena/2ae020d7ecfdbbd74f8ad402b78ce5ba to your computer and use it in GitHub Desktop.
Dumps the entire FS under path —usefull while debugging MEMFS in Wasm
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
private static void Dump(string path) | |
{ | |
if (!Directory.Exists(path)) | |
{ | |
return; | |
} | |
var dirs = Directory.GetDirectories(path); | |
foreach (var item in dirs) | |
{ | |
Console.WriteLine($"{item}/"); | |
Dump(item); | |
} | |
var files = Directory.GetFiles(path); | |
foreach (var item in files) | |
{ | |
Console.WriteLine(item); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment