You can hide a subfolder by adding explicit denied permissions for the subfolder:
rootFolder.AccessControls.Add(
new FileManagerAccessControl
{
Path = @"\Subfolder1",
DeniedPermissions = FileManagerPermissions.Full //do not show it
}
);
Actually we also have a wildcard feature that was added way back in v5.3.5:
Hide all subfolders with “Keyword” in name under the root folder:
rootFolder.AccessControls.Add(
new FileManagerAccessControl
{
Path = @"\*Keyword*",
DeniedPermissions = FileManagerPermissions.Full //do not show it
}
);
Hide all subfolders with “Keyword” in name under the root folder and under the root folder’s all subfolders - recursive:
rootFolder.AccessControls.Add(
new FileManagerAccessControl
{
Path = @"\**\*Keyword*",
DeniedPermissions = FileManagerPermissions.Full //do not show it
}
);
So you should be able to hide any subfolder:
rootFolder.AccessControls.Add(
new FileManagerAccessControl
{
Path = @"\**\*",
DeniedPermissions = FileManagerPermissions.Full //do not show it
}
);