MCPcopy
hub / github.com/promptfoo/promptfoo / isVideoFile

Function isVideoFile

src/util/fileExtensions.ts:34–38  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

32 * @returns True if the file has a video extension, false otherwise.
33 */
34export function isVideoFile(filePath: string): boolean {
35 const videoExtensions = ['mp4', 'webm', 'ogg', 'mov', 'avi', 'wmv', 'mkv', 'm4v'];
36 const fileExtension = filePath.split('.').pop()?.toLowerCase() || '';
37 return videoExtensions.includes(fileExtension);
38}
39
40/**
41 * Checks if a file is an audio file based on its extension. Non-exhaustive list.

Callers 3

file.test.tsFile · 0.90
collectFileMetadataFunction · 0.90
renderPromptFunction · 0.90

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…