Namespace: FILE#

@jupyterlite/contents.FILE

A namespace for file constructs.

Functions#

getType#

getType(ext, defaultType?): string

Get a mimetype (or fallback).

Parameters#

Name

Type

Default value

ext

string

undefined

defaultType

null | string

null

Returns#

string

Defined in#

packages/contents/src/tokens.ts:156

hasFormat#

hasFormat(ext, fileFormat): boolean

Determine whether the given extension matches a given fileFormat.

Parameters#

Name

Type

ext

string

fileFormat

"json" | "text" | "base64"

Returns#

boolean

Defined in#

packages/contents/src/tokens.ts:172