Rlabkey (version 2.8.0)

labkey.webdav.listDir: List the contents of a LabKey Server folder via WebDAV

Description

This will list the contents of a LabKey Server folder using WebDAV.

Usage

labkey.webdav.listDir(
    baseUrl=NULL,
    folderPath,
    remoteFilePath,
    fileSet='@files',
    haltOnError=TRUE
    )

Arguments

baseUrl

a string specifying the baseUrl for the labkey server

folderPath

a string specifying the folderPath

remoteFilePath

path of the folder on the remote server, relative to the folder root.

fileSet

(optional) the name of file server fileSet, which is typically "@files" (the default value for this argument). In some cases this might be "@pipeline" or "@fileset".

haltOnError

(optional) Specifies whether this request should fail if the requested path does not exist. Defaults to TRUE

Value

A list with each item under this folder. Each item (file or directory) is a list with the following attributes:

  • "files": A list of the files, where each has the following attributes:

    • "id": The relative path to this item, not encoded

    • "href": The relative URL to this item, HTML encoded

    • "text": A dataset in a date based study

    • "creationdate": The date this item was created

    • "createdby": The user that created this file

    • "lastmodified": The last modification time

    • "contentlength": The content length

    • "size": The file size

    • "isdirectory": TRUE or FALSE, depending on whether this item is a directory

  • "fileCount": If this item is a directory, this property will be present, listing the the total files in this location

Details

Lists the contents of a folder on a LabKey Server using WebDAV.

See Also

labkey.webdav.get, labkey.webdav.put, labkey.webdav.mkDir, labkey.webdav.mkDirs, labkey.webdav.pathExists, labkey.webdav.delete, labkey.webdav.downloadFolder

Examples

Run this code
# NOT RUN {
library(Rlabkey)

json <- labkey.webdav.listDir(
            baseUrl="http://labkey/",
            folderPath="home",
            remoteFilePath="myFolder"
        )

# }

Run the code above in your browser using DataCamp Workspace