Skip to main content

getOverlayFileName

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / utils/files/import/getOverlayFileName / getOverlayFileName

Function: getOverlayFileName()

getOverlayFileName(idx: number): string

Defined in: utils/files/import/getOverlayFileName.ts:36

Gets the filename for a loaded FIT file overlay by index.

Safely retrieves the file path from the loaded FIT files state with proper validation. Returns an empty string if the index is out of bounds or file data is unavailable.

Parameters​

idx​

number

Returns​

string

Example​

const filename = getOverlayFileName(0);

Throws​

TypeError when idx is not a non-negative integer.