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

View source: R/labkey.webdav.R

labkey.webdav.listDirR Documentation

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

Details

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

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

Author(s)

Ben Bimber, Ph.D.

See Also

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

Examples

## Not run: 

library(Rlabkey)

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


## End(Not run)

Rlabkey documentation built on Oct. 23, 2024, 5:06 p.m.