R: Retrieve a list of folders accessible to the current user

labkey.getFolders {Rlabkey} | R Documentation

## 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

### 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.

### 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

### Author(s)

Peter Hussey, peter@labkey.com

### See Also

Retrieve data: `labkey.selectRows`, `makeFilter`, `labkey.executeSql`
Modify data: `labkey.updateRows`, `labkey.insertRows`, `labkey.importRows`, `labkey.deleteRows`
List available data: `labkey.getQueries`, `labkey.getQueryViews`, `labkey.getQueryDetails`, `labkey.getDefaultViewDetails`, `labkey.getLookupDetails`,

### Examples

    ## List of folders
    # library(Rlabkey)

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

[Package Rlabkey version 2.3.0 Index]