Additional features available in the package

get_all_project_files() Utility Function

๐Ÿ“˜

Important note

Platformย Compatibility:ย Theย get_all_project_files()ย functionย is supportedย exclusivelyย onย Unix-basedย systemsย (e.g.,ย Linux,ย macOS)ย andย isย NOT availableย onย Windows.

ย Dependencies:ย Theย xattrsย Rย packageย isย requiredย forย usingย this function.ย Pleaseย ensureย  thatย theย packageย isย installedย toย enableย full functionality.

The get_all_project_files function provides an efficient way to retrieve detailed information about all files within a specified directory on the Seven Bridges File system.This utility function is ideal for preparing data frames that can be integrated with the File Picker Module, enhancing file selection and management in Shiny applications.

Function overview

This function fetches all files from a given directory path recursively, including their metadata if available. It constructs a comprehensive data frame containing file names, paths, sizes, and associated metadata, making it ready for use with file picker components.

Parameters


NameDescription
pathThe path to the project-files directory. This is a required parameter specifying the location from which to retrieve file information.
...Additional parameters passed to the list.files() function. Options such as pattern and include.dirs can be used to customize the file search.

The function returns a data frame with detailed file information, including:

  • File names
  • File paths
  • File sizes
  • Metadata fields, if available. The function uses the get_xattr_df() function from the xattrs package to extract metadata for each file.

Integration with File picker module

The data frame produced by get_all_project_files() can be directly used as input for the files_df parameter in the File Picker Module. This streamlines the process of populating the file picker with accurate and up-to-date file information.

Explore the usage of the get_all_project_files() utility function with the provided Rmd script by following this link: inst/demos/load_files_and_metadata.Rmd.

By utilizing get_all_project_files() function, you can efficiently gather and prepare file information, enhancing the functionality of Shiny applications that involve file management and selection.