Class: ContentsAPI#

contents.ContentsAPI

Wrap ServiceWorker requests for an Emscripten-compatible synchronous API.

Constructors#

constructor#

new ContentsAPI(baseUrl, driveName, mountpoint, FS, ERRNO_CODES)

Parameters#

Name

Type

baseUrl

string

driveName

string

mountpoint

string

FS

any

ERRNO_CODES

any

Defined in#

packages/contents/lib/drivefs.d.ts:105

Properties#

ERRNO_CODES#

Private ERRNO_CODES: any

Defined in#

packages/contents/lib/drivefs.d.ts:130


FS#

Private FS: any

Defined in#

packages/contents/lib/drivefs.d.ts:129


_baseUrl#

Private _baseUrl: any

Defined in#

packages/contents/lib/drivefs.d.ts:126


_driveName#

Private _driveName: any

Defined in#

packages/contents/lib/drivefs.d.ts:127


_mountpoint#

Private _mountpoint: any

Defined in#

packages/contents/lib/drivefs.d.ts:128

Accessors#

endpoint#

get endpoint(): string

Get the api/drive endpoint

Returns#

string

Defined in#

packages/contents/lib/drivefs.d.ts:125

Methods#

get#

get(path): IFile

Parameters#

Name

Type

path

string

Returns#

IFile

Defined in#

packages/contents/lib/drivefs.d.ts:113


getattr#

getattr(path): IStats

Parameters#

Name

Type

path

string

Returns#

IStats

Defined in#

packages/contents/lib/drivefs.d.ts:115


getmode#

getmode(path): number

Parameters#

Name

Type

path

string

Returns#

number

Defined in#

packages/contents/lib/drivefs.d.ts:108


lookup#

lookup(path): ILookup

Parameters#

Name

Type

path

string

Returns#

ILookup

Defined in#

packages/contents/lib/drivefs.d.ts:107


mknod#

mknod(path, mode): any

Parameters#

Name

Type

path

string

mode

number

Returns#

any

Defined in#

packages/contents/lib/drivefs.d.ts:109


normalizePath#

normalizePath(path): string

Normalize a Path by making it compliant for the content manager

Parameters#

Name

Type

path

string

Returns#

string

Defined in#

packages/contents/lib/drivefs.d.ts:121


put#

put(path, value): any

Parameters#

Name

Type

path

string

value

IFile

Returns#

any

Defined in#

packages/contents/lib/drivefs.d.ts:114


readdir#

readdir(path): string[]

Parameters#

Name

Type

path

string

Returns#

string[]

Defined in#

packages/contents/lib/drivefs.d.ts:111


rename#

rename(oldPath, newPath): void

Parameters#

Name

Type

oldPath

string

newPath

string

Returns#

void

Defined in#

packages/contents/lib/drivefs.d.ts:110


request#

request(data): any

Parameters#

Name

Type

data

IDriveRequest

Returns#

any

Defined in#

packages/contents/lib/drivefs.d.ts:106


rmdir#

rmdir(path): void

Parameters#

Name

Type

path

string

Returns#

void

Defined in#

packages/contents/lib/drivefs.d.ts:112