assertFileReadAllowed
FitFileViewer - API Documentation v30.0.1
FitFileViewer - API Documentation / main/security/fileAccessPolicy / assertFileReadAllowed
Function: assertFileReadAllowed()
assertFileReadAllowed(
filePath:unknown):string
Defined in: main/security/fileAccessPolicy.ts:103
Assert that a requested file read is allowed.
Parametersβ
filePathβ
unknown
Returnsβ
string
Throwsβ
Error when the path is invalid, not a FIT file, or not approved.