Learn R Programming

Rlabkey (version 2.8.0)

labkey.getFolders: Retrieve a list of folders accessible to the current user

Description

Fetch a list of all folders accessible to the current user, starting from a given folder.

Usage

labkey.getFolders(baseUrl, folderPath,
        includeEffectivePermissions=TRUE,
        includeSubfolders=FALSE, depth=50)

Arguments

baseUrl

a string specifying the address of the LabKey Server, including the context root

folderPath

the starting point for the search.

includeEffectivePermissions

If set to false, the effective permissions for this container resource will not be included. (defaults to TRUE).

includeSubfolders

whether the search for subfolders should recurse down the folder hierarchy

depth

maximum number of subfolder levels to show if includeSubfolders=TRUE

Value

The available folders are returned as a three-column data frame containing

name

the name of the folder

folderPath

the full path of the folder from the project root

effectivePermissions

the current user's effective permissions for the given folder

Details

Folders are a hierarchy of containers for data and files. The are the place where permissions are set in LabKey Server. The top level in a folder hierarchy is the project. Below the project is an arbitrary hierarchy of folders that can be used to partition data for reasons of security, visibility, and organization.

Folders cut across schemas. Some schemas, like the lists schema are not visible in a folder that has no list objects defined in it. Other schemas are visible in all folders.

See Also

labkey.getQueries, labkey.getQueryViews, labkey.getQueryDetails, labkey.getDefaultViewDetails, labkey.getLookupDetails, labkey.security.getContainers, labkey.security.createContainer, labkey.security.deleteContainer, labkey.security.moveContainer

Examples

Run this code
# NOT RUN {
## List of folders 
# library(Rlabkey)

folders <- labkey.getFolders("https://www.labkey.org", "/home")
folders

# }

Run the code above in your browser using DataLab