Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FilterFileBrowserModel

File browser model with optional filter on element.

Hierarchy

Index

Constructors

constructor

Properties

Private _filter

_filter: any

Readonly manager

The document manager instance used by the file browser model.

Protected translator

translator: ITranslator

Accessors

connectionFailure

  • get connectionFailure(): ISignal<this, Error>
  • A signal emitted when the file browser model loses connection.

    Returns ISignal<this, Error>

driveName

  • get driveName(): string
  • The drive name that gets prepended to the path.

    Returns string

fileChanged

  • Get the file path changed signal.

    Returns ISignal<this, IChangedArgs>

isDisposed

  • get isDisposed(): boolean
  • Get whether the model is disposed.

    Returns boolean

path

  • get path(): string
  • Get the current path.

    Returns string

pathChanged

  • A signal emitted when the path changes.

    Returns ISignal<this, IChangedArgs<string>>

refreshed

  • get refreshed(): ISignal<this, void>
  • A signal emitted when the directory listing is refreshed.

    Returns ISignal<this, void>

restored

  • get restored(): Promise<void>
  • A promise that resolves when the model is first restored.

    Returns Promise<void>

specs

  • Get the kernel spec models.

    Returns ISpecModels | null

uploadChanged

  • A signal emitted when an upload progresses.

    Returns ISignal<this, IChangedArgs<IUploadModel | null>>

Methods

cd

  • cd(newValue?: string): Promise<void>
  • Change directory.

    Parameters

    • Optional newValue: string

    Returns Promise<void>

    A promise with the contents of the directory.

dispose

  • dispose(): void
  • Dispose of the resources held by the model.

    Returns void

download

  • download(path: string): Promise<void>
  • Download a file.

    Parameters

    • path: string

      The path of the file to be downloaded.

    Returns Promise<void>

    A promise which resolves when the file has begun downloading.

items

  • Create an iterator over the filtered model's items.

    Returns IIterator<IModel>

    A new iterator over the model's items.

refresh

  • refresh(): Promise<void>
  • Force a refresh of the directory contents.

    Returns Promise<void>

restore

  • restore(id: string, populate?: boolean): Promise<void>
  • Restore the state of the file browser.

    Parameters

    • id: string

      The unique ID that is used to construct a state database key.

    • Optional populate: boolean

      If false, the restoration ID will be set but the file browser state will not be fetched from the state database.

    Returns Promise<void>

    A promise when restoration is complete.

    Notes

    This function will only restore the model once. If it is called multiple times, all subsequent invocations are no-ops.

sessions

  • sessions(): IIterator<IModel>
  • Create an iterator over the active sessions in the directory.

    Returns IIterator<IModel>

    A new iterator over the model's active sessions.

setFilter

  • setFilter(filter: (value: IModel) => boolean): void
  • Parameters

    • filter: (value: IModel) => boolean
        • Parameters

          Returns boolean

    Returns void

upload

  • upload(file: File): Promise<IModel>
  • Upload a File object.

    Parameters

    • file: File

      The File object to upload.

    Returns Promise<IModel>

    A promise containing the new file contents model.

    Notes

    On Notebook version < 5.1.0, this will fail to upload files that are too big to be sent in one request to the server. On newer versions, or on Jupyter Server, it will ask for confirmation then upload the file in 1 MB chunks.

uploads

  • Create an iterator over the status of all in progress uploads.

    Returns IIterator<IUploadModel>

Generated using TypeDoc