浏览代码

Create stub for IFileBrowserFactory token and interface.

Afshin Darian 8 年之前
父节点
当前提交
8c3cf07f03

+ 24 - 0
packages/filebrowser/src/factory.ts

@@ -0,0 +1,24 @@
+// Copyright (c) Jupyter Development Team.
+// Distributed under the terms of the Modified BSD License.
+
+import {
+  Token
+} from '@phosphor/coreutils';
+
+
+/* tslint:disable */
+/**
+ * The path tracker token.
+ */
+export
+const IFileBrowserFactory = new Token<IFileBrowserFactory>('jupyter.services.file-browser');
+/* tslint:enable */
+
+
+/**
+ * The file browser factory interface.
+ */
+export
+interface IFileBrowserFactory {
+  /* */
+}

+ 1 - 1
packages/filebrowser/src/index.ts

@@ -4,6 +4,6 @@
 export * from './browser';
 export * from './buttons';
 export * from './crumbs';
+export * from './factory';
 export * from './listing';
 export * from './model';
-export * from './tracker';

+ 1 - 5
packages/filebrowser/src/model.ts

@@ -21,10 +21,6 @@ import {
   IChangedArgs, PathExt, uuid
 } from '@jupyterlab/coreutils';
 
-import {
-  IPathTracker
-} from './tracker';
-
 
 /**
  * The duration of auto-refresh in ms.
@@ -45,7 +41,7 @@ const MIN_REFRESH = 1000;
  * the current directory.  Supports `'../'` syntax.
  */
 export
-class FileBrowserModel implements IDisposable, IPathTracker {
+class FileBrowserModel implements IDisposable {
   /**
    * Construct a new file browser model.
    */

+ 0 - 75
packages/filebrowser/src/tracker.ts

@@ -1,75 +0,0 @@
-// Copyright (c) Jupyter Development Team.
-// Distributed under the terms of the Modified BSD License.
-
-import {
-  Contents
-} from '@jupyterlab/services';
-
-import {
-  IIterator
-} from '@phosphor/algorithm';
-
-import {
-  Token
-} from '@phosphor/coreutils';
-
-import {
-  ISignal
-} from '@phosphor/signaling';
-
-import {
-  IChangedArgs
-} from '@jupyterlab/coreutils';
-
-
-/* tslint:disable */
-/**
- * The path tracker token.
- */
-export
-const IPathTracker = new Token<IPathTracker>('jupyter.services.file-browser');
-/* tslint:enable */
-
-
-/**
- * An interface a file browser path tracker.
- */
-export
-interface IPathTracker {
-  /**
-   * A signal emitted when the current path changes.
-   */
-  pathChanged: ISignal<IPathTracker, IChangedArgs<string>>;
-
-  /**
-   * A signal emitted when the directory listing is refreshed.
-   */
-  refreshed: ISignal<IPathTracker, void>;
-
-  /**
-   * Get the file path changed signal.
-   */
-  fileChanged: ISignal<IPathTracker, Contents.IChangedArgs>;
-
-  /**
-   * A signal emitted when the tracker loses connection.
-   */
-  connectionFailure: ISignal<IPathTracker, Error>;
-
-  /**
-   * The current path of the tracker.
-   */
-  readonly path: string;
-
-  /**
-   * Create an iterator over the tracker's items.
-   *
-   * @returns A new iterator over the model's items.
-   */
-  items(): IIterator<Contents.IModel>;
-
-  /**
-   * Force a refresh of the directory contents.
-   */
-  refresh(): Promise<void>;
-}