Skip to content

Instantly share code, notes, and snippets.

@MarcosCobena
Created November 11, 2019 13:06
Show Gist options
  • Save MarcosCobena/2ae020d7ecfdbbd74f8ad402b78ce5ba to your computer and use it in GitHub Desktop.
Save MarcosCobena/2ae020d7ecfdbbd74f8ad402b78ce5ba to your computer and use it in GitHub Desktop.
Dumps the entire FS under path —usefull while debugging MEMFS in Wasm
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