@@ -3,8 +3,11 @@ import { Contents } from '@jupyterlab/services';
33import { PathExt } from '@jupyterlab/coreutils' ;
44
55import { requestAPI } from './handler' ;
6- import { getFileType , IRegisteredFileTypes } from './token' ;
6+ import { getFileType , IRegisteredFileTypes , IContentsList } from './token' ;
77
8+ /**
9+ * The data contents model.
10+ */
811let data : Contents . IModel = {
912 name : '' ,
1013 path : '' ,
@@ -18,13 +21,9 @@ let data: Contents.IModel = {
1821 type : ''
1922} ;
2023
21- interface IContentsList {
22- [ fileName : string ] : Contents . IModel ;
23- }
24-
2524/**
2625 * Fetch the list of available drives.
27- * @returns list of drives
26+ * @returns The list of available drives.
2827 */
2928export async function getDrivesList ( ) {
3029 return await requestAPI < any > ( 'drives' , 'GET' ) ;
@@ -33,6 +32,8 @@ export async function getDrivesList() {
3332/**
3433 * Mount a drive by establishing a connection with it.
3534 * @param driveName
35+ * @param options.provider The provider of the drive to be mounted.
36+ * @param options.region The region of the drive to be mounted.
3637 */
3738export async function mountDrive (
3839 driveName : string ,
@@ -46,6 +47,15 @@ export async function mountDrive(
4647 return await requestAPI < any > ( 'drives' , 'POST' , body ) ;
4748}
4849
50+ /**
51+ * Get contents of a directory or retrieve contents of a specific file.
52+ *
53+ * @param driveName
54+ * @param options.path The path of object to be retrived
55+ * @param options.path The list containing all registered file types.
56+ *
57+ * @returns A promise which resolves with the contents model.
58+ */
4959export async function getContents (
5060 driveName : string ,
5161 options : { path : string ; registeredFileTypes : IRegisteredFileTypes }
0 commit comments