@jupyterlite

***`

@jupyterlite / @jupyterlite/contents / ServiceWorkerContentsAPI

Class: ServiceWorkerContentsAPI#

Defined in: packages/contents/src/drivefs.ts:556

An Emscripten-compatible synchronous Contents API using the service worker.

Extends#

Constructors#

Constructor#

**new ServiceWorkerContentsAPI**(options): ServiceWorkerContentsAPI

Defined in: packages/contents/src/drivefs.ts:560

Construct a new ServiceWorkerContentsAPI.

Parameters#

options#

IOptions

Returns#

ServiceWorkerContentsAPI

Overrides#

ContentsAPI.constructor

Properties#

ERRNO_CODES#

protected **ERRNO\_CODES**: any

Defined in: packages/contents/src/drivefs.ts:550

Inherited from#

ContentsAPI.ERRNO_CODES

`***

FS#

protected FS: FS

Defined in: packages/contents/src/drivefs.ts:549

Inherited from#

ContentsAPI.FS

Accessors#

endpoint#

Get Signature#

get endpoint(): string

Defined in: packages/contents/src/drivefs.ts:593

Get the api/drive endpoint

Returns#

string

Methods#

get()#

get(path): IFile

Defined in: packages/contents/src/drivefs.ts:439

Parameters#

path#

string

Returns#

IFile

Inherited from#

ContentsAPI.get

***`

getattr()#

**getattr**(path): IStats

Defined in: packages/contents/src/drivefs.ts:505

Parameters#

path#

string

Returns#

IStats

Inherited from#

ContentsAPI.getattr

`***

getmode()#

getmode(path): number

Defined in: packages/contents/src/drivefs.ts:405

Parameters#

path#

string

Returns#

number

Inherited from#

ContentsAPI.getmode

***`

lookup()#

**lookup**(path): ILookup

Defined in: packages/contents/src/drivefs.ts:401

Parameters#

path#

string

Returns#

ILookup

Inherited from#

ContentsAPI.lookup

`***

mknod()#

mknod(path, mode): null

Defined in: packages/contents/src/drivefs.ts:409

Parameters#

path#

string

mode#

number

Returns#

null

Inherited from#

ContentsAPI.mknod

***`

normalizePath()#

**normalizePath**(path): string

Defined in: packages/contents/src/drivefs.ts:530

Normalize a Path by making it compliant for the content manager

Parameters#

path#

string

Returns#

string

Inherited from#

ContentsAPI.normalizePath

`***

put()#

put(path, value): null

Defined in: packages/contents/src/drivefs.ts:476

Parameters#

path#

string

value#

IFile

Returns#

null

Inherited from#

ContentsAPI.put

***`

readdir()#

**readdir**(path): string[]

Defined in: packages/contents/src/drivefs.ts:425

Parameters#

path#

string

Returns#

string[]

Inherited from#

ContentsAPI.readdir

`***

rename()#

rename(oldPath, newPath): null

Defined in: packages/contents/src/drivefs.ts:417

Parameters#

oldPath#

string

newPath#

string

Returns#

null

Inherited from#

ContentsAPI.rename

***`

request()#

**request**\<T\>(data): [TDriveResponse](../type-aliases/TDriveResponse.md)\<T`>

Defined in: packages/contents/src/drivefs.ts:567

Type Parameters#

T#

T extends TDriveMethod

Parameters#

data#

TDriveRequest<T>

Returns#

TDriveResponse<T>

Overrides#

ContentsAPI.request

***`

rmdir()#

**rmdir**(path): null`

Defined in: packages/contents/src/drivefs.ts:435

Parameters#

path#

string

Returns#

null

Inherited from#

ContentsAPI.rmdir