@jupyterlite


@jupyterlite / @jupyterlite/contents / DriveContentsProcessor

Class: DriveContentsProcessor#

Defined in: packages/services/lib/contents/drivecontents.d.ts:68

Class for processing a drive request from the DriveFS.

Implements#

Constructors#

Constructor#

new DriveContentsProcessor(options): DriveContentsProcessor

Defined in: packages/services/lib/contents/drivecontents.d.ts:70

Parameters#

options#

IOptions

Returns#

DriveContentsProcessor

Methods#

get()#

get(request): Promise<null | { content: any; format: FileFormat; }>

Defined in: packages/services/lib/contents/drivecontents.d.ts:79

Process the request to get the content of a file

Parameters#

request#

TDriveRequest<"get">

the request

Returns#

Promise<null | { content: any; format: FileFormat; }>

Implementation of#

IDriveContentsProcessor.get


getattr()#

getattr(request): Promise<IStats>

Defined in: packages/services/lib/contents/drivecontents.d.ts:78

Process the request to get a node stats

Parameters#

request#

TDriveRequest<"getattr">

the request

Returns#

Promise<IStats>

Implementation of#

IDriveContentsProcessor.getattr


getmode()#

getmode(request): Promise<number>

Defined in: packages/services/lib/contents/drivecontents.d.ts:75

Process the request to get the node mode (file or directory)

Parameters#

request#

TDriveRequest<"getmode">

the request

Returns#

Promise<number>

Implementation of#

IDriveContentsProcessor.getmode


lookup()#

lookup(request): Promise<ILookup>

Defined in: packages/services/lib/contents/drivecontents.d.ts:76

Process the request to check if a node exist

Parameters#

request#

TDriveRequest<"lookup">

the request

Returns#

Promise<ILookup>

Implementation of#

IDriveContentsProcessor.lookup


mknod()#

mknod(request): Promise<null>

Defined in: packages/services/lib/contents/drivecontents.d.ts:77

Process the request to create a directory/file

Parameters#

request#

TDriveRequest<"mknod">

the request

Returns#

Promise<null>

Implementation of#

IDriveContentsProcessor.mknod


processDriveRequest()#

processDriveRequest<T>(request): Promise<TDriveResponse<T>>

Defined in: packages/services/lib/contents/drivecontents.d.ts:71

Process a content request

Type Parameters#

T#

T extends TDriveMethod

Parameters#

request#

TDriveRequest<T>

the request

Returns#

Promise<TDriveResponse<T>>

Implementation of#

IDriveContentsProcessor.processDriveRequest


put()#

put(request): Promise<null>

Defined in: packages/services/lib/contents/drivecontents.d.ts:80

Process the request to write the content of a file

Parameters#

request#

TDriveRequest<"put">

the request

Returns#

Promise<null>

Implementation of#

IDriveContentsProcessor.put


readdir()#

readdir(request): Promise<string[]>

Defined in: packages/services/lib/contents/drivecontents.d.ts:72

Process the request to read a directory content

Parameters#

request#

TDriveRequest<"readdir">

the request

Returns#

Promise<string[]>

Implementation of#

IDriveContentsProcessor.readdir


rename()#

rename(request): Promise<null>

Defined in: packages/services/lib/contents/drivecontents.d.ts:74

Process the request to rename a file or directory

Parameters#

request#

TDriveRequest<"rename">

the request

Returns#

Promise<null>

Implementation of#

IDriveContentsProcessor.rename


rmdir()#

rmdir(request): Promise<null>

Defined in: packages/services/lib/contents/drivecontents.d.ts:73

Process the request to remove a directory

Parameters#

request#

TDriveRequest<"rmdir">

the request

Returns#

Promise<null>

Implementation of#

IDriveContentsProcessor.rmdir