@jupyterlite

***`

@jupyterlite / @jupyterlite/contents / ServiceWorkerContentsAPI

类:ServiceWorkerContentsAPI#

定义位置:packages/contents/src/drivefs.ts:556

一个 Emscripten 兼容的同步内容 API,使用服务工作线程。

扩展#

构造函数#

构造函数#

**new** ServiceWorkerContentsAPI**(options):ServiceWorkerContentsAPI

定义位置:packages/contents/src/drivefs.ts:560

构造一个新的 ServiceWorkerContentsAPI。

参数#

选项#

IOptions

返回#

ServiceWorkerContentsAPI

覆盖#

ContentsAPI.constructor

属性#

ERRNO_CODES#

protected **ERRNO\_CODES**any

定义位置:packages/contents/src/drivefs.ts:550

继承自#

ContentsAPI.ERRNO_CODES

`***

FS#

protected FSFS

定义位置:packages/contents/src/drivefs.ts:549

继承自#

ContentsAPI.FS

访问器#

endpoint#

获取签名#

get endpoint():string

定义位置:packages/contents/src/drivefs.ts:593

获取 api/drive 端点

返回#

string

方法#

get()#

get(path):IFile

定义位置:packages/contents/src/drivefs.ts:439

参数#

path#

string

返回#

IFile

继承自#

ContentsAPI.get

***`

getattr()#

**getattr**(path):IStats

定义位置:packages/contents/src/drivefs.ts:505

参数#

path#

string

返回#

IStats

继承自#

ContentsAPI.getattr

`***

getmode()#

getmode(path):number

定义位置:packages/contents/src/drivefs.ts:405

参数#

path#

string

返回#

number

继承自#

ContentsAPI.getmode

***`

lookup()#

**lookup**(path):ILookup

定义位置:packages/contents/src/drivefs.ts:401

参数#

path#

string

返回#

ILookup

继承自#

ContentsAPI.lookup

`***

mknod()#

mknod(path, mode):null

定义位置:packages/contents/src/drivefs.ts:409

参数#

path#

string

mode#

number

返回#

null

继承自#

ContentsAPI.mknod

***`

normalizePath()#

**normalizePath**(path):string

定义位置:packages/contents/src/drivefs.ts:530

通过使其符合内容管理器的要求来标准化路径

参数#

path#

string

返回#

string

继承自#

ContentsAPI.normalizePath

`***

put()#

put(path, value):null

定义位置:packages/contents/src/drivefs.ts:476

参数#

path#

string

value#

IFile

返回#

null

继承自#

ContentsAPI.put

***`

readdir()#

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

定义位置:packages/contents/src/drivefs.ts:425

参数#

path#

string

返回#

string[]

继承自#

ContentsAPI.readdir

`***

rename()#

rename(oldPath, newPath):null

定义位置:packages/contents/src/drivefs.ts:417

参数#

oldPath#

string

newPath#

string

返回#

null

继承自#

ContentsAPI.rename

***`

request()#

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

定义位置:packages/contents/src/drivefs.ts:567

类型参数#

T#

T extends TDriveMethod

参数#

data#

TDriveRequest<T>

返回#

TDriveResponse<T>

覆盖#

ContentsAPI.request

***`

rmdir()#

**rmdir**(path): null`

定义位置:packages/contents/src/drivefs.ts:435

参数#

path#

string

返回#

null

继承自#

ContentsAPI.rmdir