Skip to main content

Function: getFileExt()

Call Signature​

function getFileExt(options: GetFileExtOptions): string;

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

Extracts and normalizes the file extension, handling special cases like .gz and .cbor.

Parameters​

ParameterTypeDescription
optionsGetFileExtOptionsOptions containing fullname and optional upperCase flag

Returns​

string

The normalized file extension

Call Signature​

function getFileExt(fullname: string, upperCase?: boolean): string;

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

Extracts and normalizes the file extension, handling special cases like .gz and .cbor.

Parameters​

ParameterTypeDescription
fullnamestringThe full filename or path
upperCase?booleanWhether to return uppercase extension (default: true)

Returns​

string

The normalized file extension