44import { Signal , ISignal } from '@lumino/signaling' ;
55import { Contents , ServerConnection } from '@jupyterlab/services' ;
66import { PathExt } from '@jupyterlab/coreutils' ;
7- import { IDrivesList } from './token' ;
7+ import { IDriveInfo } from './token' ;
88
99let data : Contents . IModel = {
1010 name : '' ,
@@ -28,21 +28,21 @@ export class Drive implements Contents.IDrive {
2828 constructor ( options : Drive . IOptions = { } ) {
2929 this . _serverSettings = ServerConnection . makeSettings ( ) ;
3030 this . _name = options . name ?? '' ;
31- this . _drivesList = options . drivesList ?? { names : [ ] } ;
31+ this . _drivesList = options . drivesList ?? [ ] ;
3232 //this._apiEndpoint = options.apiEndpoint ?? SERVICE_DRIVE_URL;
3333 }
3434
3535 /**
3636 * The drives list getter.
3737 */
38- get drivesList ( ) : IDrivesList {
38+ get drivesList ( ) : IDriveInfo [ ] {
3939 return this . _drivesList ;
4040 }
4141
4242 /**
4343 * The drives list setter.
4444 * */
45- set drivesList ( list : IDrivesList ) {
45+ set drivesList ( list : IDriveInfo [ ] ) {
4646 this . _drivesList = list ;
4747 }
4848
@@ -204,12 +204,12 @@ export class Drive implements Contents.IDrive {
204204 } ;
205205 } else {
206206 const drivesList : Contents . IModel [ ] = [ ] ;
207- for ( const drive of this . _drivesList . names ) {
207+ for ( const drive of this . _drivesList ) {
208208 drivesList . push ( {
209- name : drive ,
210- path : drive ,
209+ name : drive . name ,
210+ path : drive . name ,
211211 last_modified : '' ,
212- created : '' ,
212+ created : drive . creationDate ,
213213 content : [ ] ,
214214 format : 'json' ,
215215 mimetype : '' ,
@@ -593,7 +593,7 @@ export class Drive implements Contents.IDrive {
593593 }*/
594594
595595 // private _apiEndpoint: string;
596- private _drivesList : IDrivesList = { names : [ ] } ;
596+ private _drivesList : IDriveInfo [ ] = [ ] ;
597597 private _serverSettings : ServerConnection . ISettings ;
598598 private _name : string = '' ;
599599 private _provider : string = '' ;
@@ -613,7 +613,7 @@ export namespace Drive {
613613 /**
614614 * List of available drives.
615615 */
616- drivesList ?: IDrivesList ;
616+ drivesList ?: IDriveInfo [ ] ;
617617
618618 /**
619619 * The name for the `Drive`, which is used in file
0 commit comments