Learn R Programming

osfr (version 0.1.1)

get_files_info: Get file information

Description

This function creates a data frame containing the information about all of the files and folders in an OSF node (project or component).

Usage

get_files_info(id, private = FALSE)

Arguments

id

OSF id (osf.io/XXXXX) for the node (project or component) to get file info for

private

Boolean to specify whether to get info for private files

Details

Note that the file GUID will not populate until the file has been viewed on OSF through a browser.

The data frame will contain the following information:

  • name: Name of file/folder

  • materialized: The materialized path of the file on OSF (i.e. "my_folder/my_file.csv")

  • kind: Whether it is a file or a folder

  • guid: The GUID of the file (for more information see this FAQ on GUID's).

  • provider: The provider the file is stored on

  • created_utc: The time the file was created (UTC timezone)

  • modified_utc: The last time the file was modified (UTC timezone)

  • downloads: The number of times the file has been downloaded

  • version: The most recent version number of the file

  • href: A WaterButler link to the file for direct manipulation (downloads, uploads, moving, etc.).

  • folder_link: An OSF API link to the folder

Examples

Run this code
# NOT RUN {
get_files_info(id = "m5pds")
# }

Run the code above in your browser using DataLab