@jupyterlite

***`

@jupyterlite / @jupyterlite/services / DriveContentsProcessor

Class: DriveContentsProcessor#

Defined in: packages/services/src/contents/drivecontents.ts:84

Class for processing a drive request from the DriveFS.

Implements#

Constructors#

Constructor#

**new DriveContentsProcessor**(options): DriveContentsProcessor

Defined in: packages/services/src/contents/drivecontents.ts:87

Parameters#

options#

IOptions

Returns#

DriveContentsProcessor

Methods#

get()#

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

Defined in: packages/services/src/contents/drivecontents.ts:216

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/src/contents/drivecontents.ts:194

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/src/contents/drivecontents.ts:151

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/src/contents/drivecontents.ts:162

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/src/contents/drivecontents.ts:178

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/src/contents/drivecontents.ts:91

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/src/contents/drivecontents.ts:237

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/src/contents/drivecontents.ts:132

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/src/contents/drivecontents.ts:146

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/src/contents/drivecontents.ts:141

Process the request to remove a directory

Parameters#

request#

TDriveRequest<"rmdir">

the request

Returns#

Promise<null>

Implementation of#

IDriveContentsProcessor.rmdir