# Class: `DriveContentsProcessor` [@jupyterlite/contents](../modules/jupyterlite_contents.md).DriveContentsProcessor Class for processing a drive request from the DriveFS. ## Implements - [`IDriveContentsProcessor`](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md) ## Constructors ### `constructor` > > **`new DriveContentsProcessor`**(`options`) #### Parameters | Name | Type | | :------ | :------ | | `options` | [`IOptions`](../interfaces/jupyterlite_contents.DriveContentsProcessor.IOptions.md) | #### Defined in [packages/contents/src/drivecontents.ts:86](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L86) ## Properties ### `contentsManager` > > `Private` **`contentsManager`**: `IManager` #### Defined in [packages/contents/src/drivecontents.ts:84](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L84) ## Methods ### `get` > > **`get`**(`request`): `Promise`<`undefined` \| { `content`: `any` ; `format`: `FileFormat` }\> Process the request to get the content of a file #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"get"``\> | the request | #### Returns `Promise`<`undefined` \| { `content`: `any` ; `format`: `FileFormat` }\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[get](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#get) #### Defined in [packages/contents/src/drivecontents.ts:209](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L209) ### `getattr` > > **`getattr`**(`request`): `Promise`<[`IStats`](../interfaces/jupyterlite_contents.IStats.md)\> Process the request to get a node stats #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"getattr"``\> | the request | #### Returns `Promise`<[`IStats`](../interfaces/jupyterlite_contents.IStats.md)\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[getattr](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#getattr) #### Defined in [packages/contents/src/drivecontents.ts:187](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L187) ### `getmode` > > **`getmode`**(`request`): `Promise`<`number`\> Process the request to get the node mode (file or directory) #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"getmode"``\> | the request | #### Returns `Promise`<`number`\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[getmode](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#getmode) #### Defined in [packages/contents/src/drivecontents.ts:150](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L150) ### `lookup` > > **`lookup`**(`request`): `Promise`<[`ILookup`](../interfaces/jupyterlite_contents.DriveFS.ILookup.md)\> Process the request to check if a node exist #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"lookup"``\> | the request | #### Returns `Promise`<[`ILookup`](../interfaces/jupyterlite_contents.DriveFS.ILookup.md)\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[lookup](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#lookup) #### Defined in [packages/contents/src/drivecontents.ts:161](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L161) ### `mknod` > > **`mknod`**(`request`): `Promise`<``null``\> Process the request to create a directory/file #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"mknod"``\> | the request | #### Returns `Promise`<``null``\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[mknod](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#mknod) #### Defined in [packages/contents/src/drivecontents.ts:177](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L177) ### `processDriveRequest` > > **`processDriveRequest`**<`T`\>(`request`): `Promise`<[`TDriveResponse`](../modules/jupyterlite_contents.md#tdriveresponse)<`T`\>\> Process a content request #### Type parameters | Name | Type | | :------ | :------ | | `T` | extends [`TDriveMethod`](../modules/jupyterlite_contents.md#tdrivemethod) | #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<`T`\> | the request | #### Returns `Promise`<[`TDriveResponse`](../modules/jupyterlite_contents.md#tdriveresponse)<`T`\>\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[processDriveRequest](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#processdriverequest) #### Defined in [packages/contents/src/drivecontents.ts:90](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L90) ### `put` > > **`put`**(`request`): `Promise`<``null``\> Process the request to write the content of a file #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"put"``\> | the request | #### Returns `Promise`<``null``\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[put](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#put) #### Defined in [packages/contents/src/drivecontents.ts:225](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L225) ### `readdir` > > **`readdir`**(`request`): `Promise`<`string`[]\> Process the request to read a directory content #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"readdir"``\> | the request | #### Returns `Promise`<`string`[]\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[readdir](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#readdir) #### Defined in [packages/contents/src/drivecontents.ts:131](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L131) ### `rename` > > **`rename`**(`request`): `Promise`<``null``\> Process the request to rename a file or directory #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"rename"``\> | the request | #### Returns `Promise`<``null``\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[rename](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#rename) #### Defined in [packages/contents/src/drivecontents.ts:145](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L145) ### `rmdir` > > **`rmdir`**(`request`): `Promise`<``null``\> Process the request to remove a directory #### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `request` | [`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<``"rmdir"``\> | the request | #### Returns `Promise`<``null``\> #### Implementation of [IDriveContentsProcessor](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md).[rmdir](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md#rmdir) #### Defined in [packages/contents/src/drivecontents.ts:140](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/contents/src/drivecontents.ts#L140)