public static FileManagerResource NormalizePath(string root, FileManagerResource resource)
{
resource.Path = resource.Path.Replace(root, "").Replace(@"\", @"/");
foreach (var child in resource.Children)
{
child.Path = child.Path.Replace(root, "").Replace(@"\", @"/");
if (child.IsDirectory)
{
NormalizePath(root, child);
}
}
return resource;
}