---
agentTools:
  projectIndex: https://docs.cancergenomicscloud.org/llms.txt
---

# 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

<br />

| Name     | Description                                                                                                                                   |
| :------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| **path** | The 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](https://github.com/sbg/sbShinyModules/tree/develop/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.