I'm traveling through some shares to get information/permissions .. etc
I'm using recursive to travel through all sub shares. it works fine however, the user should be able to limit the sub shares level to specific number which is a parameter in the application?

```
private static INodeCollection NodesLookUp(string path)
    {
        var shareCollectionNode = new ShareCollection(path);
        // Do somethings

       foreach (var directory in Directory.GetDirectories(shareCollectionNode.FullPath))
        {
            shareCollectionNode.AddNode(NodesLookUp(directory));

        }
        return shareCollectionNode;
    }

```

this code will go all way to the lowest level, how can i stop it in specific level? for example get all shares until 2 levels only?

Thanks.