Back to product page

Visibilities enumeration

These constants are used with Visibility property, and define when is virtual folder visible, assuming it already matches RelativePath property.


Since RelativePath can contains wildcards, setting it to '*' can cause clients to see paths like this:

which can go unlimited levels deep. To prevent this, you can use above constants like this:

AlwaysVisible means that there is no restriction for defines Virtual Folder to appear any number of times in the relative path.

NoSelfRecursion means that same Virtual Folder cannot appear twice in the relative path, but relative path may contain other Virtual Folders.

NoAnyRecursion meads that the Virtual Folder cannot appear in the path if any other Virtual Folder already exists.

Typicall sample would be like this:
User.VirtualFolders.Add "*", "[Name1]", "C:\Program Files"
User.VirtualFolders.Add "*", "[Name2]", "C:\"
User.VirtualFolders(0).Visibility = NoSelfRecursion
User.VirtualFolders(1).Visibility = NoAnyRecursion

If you try above code, you will see that on root / path you will see both [Name1] and [Name2]. If you change directory to /[Name2] then [Name1] will appear again - because it is set only to NoSelfRecursion, but allows other Virtual Folders to appear. However, if you change directory to /[Name1] then [Name2] will NOT appear anymore, because it's set to NoAnyRecursion - it cannot be offered anymore if any other virtual folder is already in the path.


Constant Value Description
AlwaysVisible0 NoAnyRecursion
NoSelfRecursion 1 Same virtual folder cannot be shown twice in relative path.
NoAnyRecursion2 Not any two virtual folders can be shown in same relative path.