Frapid.Config.Models.FileManagerResource.NormalizePath C# (CSharp) Méthode

NormalizePath() public static méthode

public static NormalizePath ( string root, FileManagerResource resource ) : FileManagerResource
root string
resource FileManagerResource
Résultat FileManagerResource
        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;
        }