@jupyterlite

***`

@jupyterlite / @jupyterlite/services / ServiceWorkerContentsAPI

Class: ServiceWorkerContentsAPI#

Defined in: packages/services/src/contents/drivefs.ts:614

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

Extends#

Constructors#

Constructor#

**new ServiceWorkerContentsAPI**(options): ServiceWorkerContentsAPI

Defined in: packages/services/src/contents/drivefs.ts:618

Construct a new ServiceWorkerContentsAPI.

Parameters#

options#

IOptions

Returns#

ServiceWorkerContentsAPI

Overrides#

ContentsAPI.constructor

Properties#

ERRNO_CODES#

protected **ERRNO\_CODES**: any

Defined in: packages/services/src/contents/drivefs.ts:608

Inherited from#

ContentsAPI.ERRNO_CODES

`***

FS#

protected FS: FS

Defined in: packages/services/src/contents/drivefs.ts:607

Inherited from#

ContentsAPI.FS

Accessors#

endpoint#

Get Signature#

get endpoint(): string

Defined in: packages/services/src/contents/drivefs.ts:655

Get the api/drive endpoint

Returns#

string

Methods#

get()#

get(path): IFile

Defined in: packages/services/src/contents/drivefs.ts:498

Parameters#

path#

string

Returns#

IFile

Inherited from#

ContentsAPI.get

***`

getattr()#

**getattr**(path): IStats

Defined in: packages/services/src/contents/drivefs.ts:564

Parameters#

path#

string

Returns#

IStats

Inherited from#

ContentsAPI.getattr

`***

getmode()#

getmode(path): number

Defined in: packages/services/src/contents/drivefs.ts:464

Parameters#

path#

string

Returns#

number

Inherited from#

ContentsAPI.getmode

***`

lookup()#

**lookup**(path): ILookup

Defined in: packages/services/src/contents/drivefs.ts:460

Parameters#

path#

string

Returns#

ILookup

Inherited from#

ContentsAPI.lookup

`***

mknod()#

mknod(path, mode): null

Defined in: packages/services/src/contents/drivefs.ts:468

Parameters#

path#

string

mode#

number

Returns#

null

Inherited from#

ContentsAPI.mknod

***`

normalizePath()#

**normalizePath**(path): string

Defined in: packages/services/src/contents/drivefs.ts:588

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/services/src/contents/drivefs.ts:535

Parameters#

path#

string

value#

IFile

Returns#

null

Inherited from#

ContentsAPI.put

***`

readdir()#

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

Defined in: packages/services/src/contents/drivefs.ts:484

Parameters#

path#

string

Returns#

string[]

Inherited from#

ContentsAPI.readdir

`***

rename()#

rename(oldPath, newPath): null

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

Parameters#

oldPath#

string

newPath#

string

Returns#

null

Inherited from#

ContentsAPI.rename

***`

request()#

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

Defined in: packages/services/src/contents/drivefs.ts:625

Type Parameters#

T#

T extends TDriveMethod

Parameters#

data#

TDriveRequest<T>

Returns#

TDriveResponse<T>

Overrides#

ContentsAPI.request

***`

rmdir()#

**rmdir**(path): null`

Defined in: packages/services/src/contents/drivefs.ts:494

Parameters#

path#

string

Returns#

null

Inherited from#

ContentsAPI.rmdir