Use the Permission interface Dirlist property to determine if a group or client has permissions to see a list of folder contents, and to allow or deny permission to see folder lists.
Signature:
HRESULT DirList([out, retval] VARIANT_BOOL *pVal);
HRESULT DirList([in] VARIANT_BOOL newVal);
True = Allowed
False = Prohibited
Refer to Permission Interface Properties for an illustration of how this and other Permission properties can be accessed in the Administrator interface.
Within the VFS system, the DirList file permission and the DirShowInList folder permission can confuse users as to the intended operation of the server. At first glance, it would appear that DirList refers to the ability to see files in the directory and DirShowInList would refer to the ability to see folders in the directory, but this is incorrect.
The DirList file permission refers to the user’s ability to retrieve a directory listing from the Server. If this option is enabled, the user is able to see a list of files in the directory. If it is disabled, no files or directories will be visible.
The DirShowInList permission is a bit more complex in that the permission corresponds to whether or not the directory will show up when a directory listing is retrieved in the parent directory. The interaction between inheritance and this setting can therefore lead to a bit of confusion.
Let’s use the following folder structure as an example:
If you select the folder Alex and disable the DirShowInList permission for folder Jane, then when user Jane navigates to the /Usr/ directory and retrieves a directory listing, the folder Alex will NOT appear in her directory listing. To complicate matters, however, Jane still has access to the folder and if someone tells her to manually navigate to that folder she will still be able to perform actions within the Alex folder (provided she has appropriate permissions). In this scenario, by default, when user Jane retrieves a directory listing from within the folder Alex, she will only see a list of files in the folder; she will not see any subfolders in the folder. Why? Because the subfolders (incoming, outgoing, and shared) have all inherited the disabled DirShowInList setting!
Summary:
The DirList permission applies to both files and folders in the current folder.
The DirShowInList permission applies to the visibility of the current folder in its parent directory.
Default inheritance rules will not allow the display of subfolders of a DirShowInList-disabled folder.