Skip to main content

Function: traverseFileTree()

function traverseFileTree(
item: FileSystemEntry,
path: string,
fileArray: File[],
): Promise<File[]>;

Defined in: niivue/data/FileLoader.ts:217

Recursively traverse a file tree and collect all files

Parameters

ParameterTypeDefault valueDescription
itemFileSystemEntryundefinedFileSystemEntry to traverse
pathstring''Current path prefix
fileArrayFile[]undefinedArray to accumulate files

Returns

Promise<File[]>

Promise resolving to array of files with fullPath and _webkitRelativePath properties