[**@jupyterlite**](../../../README.md) *** [@jupyterlite](../../../README.md) / [@jupyterlite/contents](../README.md) / ServiceWorkerContentsAPI # Class: ServiceWorkerContentsAPI Defined in: packages/services/lib/contents/drivefs.d.ts:137 An Emscripten-compatible synchronous Contents API using the service worker. ## Extends - [`ContentsAPI`](../../services/classes/ContentsAPI.md) ## Constructors ### Constructor > **new ServiceWorkerContentsAPI**(`options`): `ServiceWorkerContentsAPI` Defined in: packages/services/lib/contents/drivefs.d.ts:141 Construct a new ServiceWorkerContentsAPI. #### Parameters ##### options [`IOptions`](../namespaces/ServiceWorkerContentsAPI/interfaces/IOptions.md) #### Returns `ServiceWorkerContentsAPI` #### Overrides [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`constructor`](../../services/classes/ContentsAPI.md#constructor) ## Properties ### ERRNO\_CODES > `protected` **ERRNO\_CODES**: `any` Defined in: packages/services/lib/contents/drivefs.d.ts:132 #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`ERRNO_CODES`](../../services/classes/ContentsAPI.md#errno_codes) *** ### FS > `protected` **FS**: `any` Defined in: packages/services/lib/contents/drivefs.d.ts:131 #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`FS`](../../services/classes/ContentsAPI.md#fs) ## Accessors ### endpoint #### Get Signature > **get** **endpoint**(): `string` Defined in: packages/services/lib/contents/drivefs.d.ts:146 Get the api/drive endpoint ##### Returns `string` ## Methods ### get() > **get**(`path`): [`IFile`](../namespaces/DriveFS/interfaces/IFile.md) Defined in: packages/services/lib/contents/drivefs.d.ts:119 #### Parameters ##### path `string` #### Returns [`IFile`](../namespaces/DriveFS/interfaces/IFile.md) #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`get`](../../services/classes/ContentsAPI.md#get) *** ### getattr() > **getattr**(`path`): [`IStats`](../interfaces/IStats.md) Defined in: packages/services/lib/contents/drivefs.d.ts:121 #### Parameters ##### path `string` #### Returns [`IStats`](../interfaces/IStats.md) #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`getattr`](../../services/classes/ContentsAPI.md#getattr) *** ### getmode() > **getmode**(`path`): `number` Defined in: packages/services/lib/contents/drivefs.d.ts:114 #### Parameters ##### path `string` #### Returns `number` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`getmode`](../../services/classes/ContentsAPI.md#getmode) *** ### lookup() > **lookup**(`path`): [`ILookup`](../namespaces/DriveFS/interfaces/ILookup.md) Defined in: packages/services/lib/contents/drivefs.d.ts:113 #### Parameters ##### path `string` #### Returns [`ILookup`](../namespaces/DriveFS/interfaces/ILookup.md) #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`lookup`](../../services/classes/ContentsAPI.md#lookup) *** ### mknod() > **mknod**(`path`, `mode`): `null` Defined in: packages/services/lib/contents/drivefs.d.ts:115 #### Parameters ##### path `string` ##### mode `number` #### Returns `null` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`mknod`](../../services/classes/ContentsAPI.md#mknod) *** ### normalizePath() > **normalizePath**(`path`): `string` Defined in: packages/services/lib/contents/drivefs.d.ts:127 Normalize a Path by making it compliant for the content manager #### Parameters ##### path `string` #### Returns `string` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`normalizePath`](../../services/classes/ContentsAPI.md#normalizepath) *** ### put() > **put**(`path`, `value`): `null` Defined in: packages/services/lib/contents/drivefs.d.ts:120 #### Parameters ##### path `string` ##### value [`IFile`](../namespaces/DriveFS/interfaces/IFile.md) #### Returns `null` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`put`](../../services/classes/ContentsAPI.md#put) *** ### readdir() > **readdir**(`path`): `string`[] Defined in: packages/services/lib/contents/drivefs.d.ts:117 #### Parameters ##### path `string` #### Returns `string`[] #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`readdir`](../../services/classes/ContentsAPI.md#readdir) *** ### rename() > **rename**(`oldPath`, `newPath`): `null` Defined in: packages/services/lib/contents/drivefs.d.ts:116 #### Parameters ##### oldPath `string` ##### newPath `string` #### Returns `null` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`rename`](../../services/classes/ContentsAPI.md#rename) *** ### request() > **request**\<`T`\>(`data`): [`TDriveResponse`](../type-aliases/TDriveResponse.md)\<`T`\> Defined in: packages/services/lib/contents/drivefs.d.ts:142 #### Type Parameters ##### T `T` *extends* [`TDriveMethod`](../type-aliases/TDriveMethod.md) #### Parameters ##### data [`TDriveRequest`](../type-aliases/TDriveRequest.md)\<`T`\> #### Returns [`TDriveResponse`](../type-aliases/TDriveResponse.md)\<`T`\> #### Overrides [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`request`](../../services/classes/ContentsAPI.md#request) *** ### rmdir() > **rmdir**(`path`): `null` Defined in: packages/services/lib/contents/drivefs.d.ts:118 #### Parameters ##### path `string` #### Returns `null` #### Inherited from [`ContentsAPI`](../../services/classes/ContentsAPI.md).[`rmdir`](../../services/classes/ContentsAPI.md#rmdir)