Get folder visibility status in a map view

An AGG group in a View can be visible or hidden, and its status may be controlled by HideMarkedGroups_MVIEW, for example.

However, if the group is placed in a folder, then the group visibility status is not immediately relevant when the folder is set hidden, because the AGG would not be visible anyway.

1. Is there a function that controls folder visibility status?
2. Is there a way to get the parent folder of a group in a view?

Any version of the above functionalities would be very much appreciated (.NET, GX, python). Any related info would be also great to know (like such functionalities have not yet been made available externally).

Thank you,
Dumitru