# `@jupyterlite/contents` ## Type Aliases ### `ERRNO_CODES` Ƭ **`ERRNO_CODES`**: `any` The emscripten filesystem error codes. #### Defined in [packages/contents/src/emscripten.ts:131](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L131) ### `FS` Ƭ **`FS`**: `EmscriptenFS` & { `ErrnoError`: `any` ; `createNode`: (`parent`: [`IEmscriptenFSNode`](../interfaces/jupyterlite_contents.IEmscriptenFSNode.md) \| ``null``, `name`: `string`, `mode`: `number`, `dev`: `number`) => [`IEmscriptenFSNode`](../interfaces/jupyterlite_contents.IEmscriptenFSNode.md) } The emscripten filesystem module API. #### Defined in [packages/contents/src/emscripten.ts:118](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L118) ### `IModel` Ƭ **`IModel`**: `ServerContents.IModel` #### Defined in [packages/contents/src/contents.ts:14](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/contents.ts#L14) ### `PATH` Ƭ **`PATH`**: `Object` The emscripten FS Path API. #### Type declaration | Name | Type | | :------ | :------ | | `basename` | (`path`: `string`) => `string` | | `dirname` | (`path`: `string`) => `string` | | `join` | (...`parts`: `string`[]) => `string` | | `join2` | (`l`: `string`, `r`: `string`) => `string` | | `normalize` | (`path`: `string`) => `string` | | `splitPath` | (`filename`: `string`) => `string` | #### Defined in [packages/contents/src/emscripten.ts:136](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L136) ### `TDriveData` Ƭ **`TDriveData`**: `Object` Type of the data argument for the drive request, based on the request name #### Type declaration | Name | Type | | :------ | :------ | | `mknod` | { `mode`: `number` } | | `mknod.mode` | `number` | | `put` | { `data`: `any` ; `format`: `Contents.FileFormat` } | | `put.data` | `any` | | `put.format` | `Contents.FileFormat` | | `rename` | { `newPath`: `string` } | | `rename.newPath` | `string` | #### Defined in [packages/contents/src/drivefs.ts:48](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L48) ### `TDriveMethod` Ƭ **`TDriveMethod`**: ``"readdir"`` \| ``"rmdir"`` \| ``"rename"`` \| ``"getmode"`` \| ``"lookup"`` \| ``"mknod"`` \| ``"getattr"`` \| ``"get"`` \| ``"put"`` #### Defined in [packages/contents/src/drivefs.ts:34](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L34) ### `TDriveRequest` Ƭ **`TDriveRequest`**<`T`\>: { `method`: `T` ; `path`: `string` ; `receiver?`: ``"broadcast.ts"`` } & `T` extends keyof [`TDriveData`](jupyterlite_contents.md#tdrivedata) ? { `data`: [`TDriveData`](jupyterlite_contents.md#tdrivedata)[`T`] } : `object` Drive request #### Type parameters | Name | Type | | :------ | :------ | | `T` | extends [`TDriveMethod`](jupyterlite_contents.md#tdrivemethod) | #### Defined in [packages/contents/src/drivefs.ts:77](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L77) ### `TDriveResponse` Ƭ **`TDriveResponse`**<`T`\>: `TDriveResponses`[`T`] Drive response #### Type parameters | Name | Type | | :------ | :------ | | `T` | extends [`TDriveMethod`](jupyterlite_contents.md#tdrivemethod) | #### Defined in [packages/contents/src/drivefs.ts:121](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L121) ## Variables ### `BLOCK_SIZE` > > `Const` **`BLOCK_SIZE`**: ``4096`` #### Defined in [packages/contents/src/drivefs.ts:29](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L29) ### `DIR_MODE` > > `Const` **`DIR_MODE`**: ``16895`` #### Defined in [packages/contents/src/emscripten.ts:20](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L20) ### `DRIVE_API_PATH` > > `Const` **`DRIVE_API_PATH`**: ``"/api/drive.v1"`` #### Defined in [packages/contents/src/drivefs.ts:27](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L27) ### `DRIVE_SEPARATOR` > > `Const` **`DRIVE_SEPARATOR`**: ``":"`` #### Defined in [packages/contents/src/drivefs.ts:26](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivefs.ts#L26) ### `FILE_MODE` > > `Const` **`FILE_MODE`**: ``33206`` #### Defined in [packages/contents/src/emscripten.ts:21](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L21) ### `IBroadcastChannelWrapper` > > `Const` **`IBroadcastChannelWrapper`**: `Token`<[`IBroadcastChannelWrapper`](jupyterlite_contents.md#ibroadcastchannelwrapper)\> The token for the BroadcastChannel broadcaster. #### Defined in [packages/contents/src/tokens.ts:194](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/tokens.ts#L194) [packages/contents/src/tokens.ts:198](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/tokens.ts#L198) ### `IContents` > > `Const` **`IContents`**: `Token`<[`IContents`](jupyterlite_contents.md#icontents)\> The token for the settings service. #### Defined in [packages/contents/src/tokens.ts:13](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/tokens.ts#L13) [packages/contents/src/tokens.ts:18](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/tokens.ts#L18) ### `SEEK_CUR` > > `Const` **`SEEK_CUR`**: ``1`` #### Defined in [packages/contents/src/emscripten.ts:22](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L22) ### `SEEK_END` > > `Const` **`SEEK_END`**: ``2`` #### Defined in [packages/contents/src/emscripten.ts:23](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L23) ## Functions ### `instanceOfStream` > > **`instanceOfStream`**(`nodeOrStream`): nodeOrStream is IEmscriptenStream #### Parameters | Name | Type | | :------ | :------ | | `nodeOrStream` | [`IEmscriptenFSNode`](../interfaces/jupyterlite_contents.IEmscriptenFSNode.md) \| [`IEmscriptenStream`](../interfaces/jupyterlite_contents.IEmscriptenStream.md) | #### Returns nodeOrStream is IEmscriptenStream #### Defined in [packages/contents/src/emscripten.ts:60](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/emscripten.ts#L60)