Skip to content

findFolder

Jason Godesky edited this page Jul 27, 2026 · 1 revision

findFolder uses a slash-separated path to find a folder.

Parameters

path: string

The slash-separated path of the folder you wish to find. For example, if you want to find the Test Folder, which is inside of Subfolder, which is itself inside of Root Folder, you would pass in Root Folder/Subfolder/Test Folder. The segments are trimmed, so you can add spaces (e.g., Root Folder / Subfolder / Test Folder).

Returns

The Folder if one matching those criteria could be found, or undefined if not.

Examples

import { findFolder } from '@revolutionarygamesco/common-foundryvtt'

const folder = findFolder('Path / To / My / Folder')

Clone this wiki locally