Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NotebookDocument

Hierarchy

  • NotebookDocument

Index

Properties

Readonly cells

cells: NotebookCell[]

All cells.

Readonly fileName

fileName: string

The file system path of the associated resource. Shorthand notation for TextDocument.uri.fsPath. Independent of the uri scheme.

Readonly isClosed

isClosed: boolean

true if the document have been closed. A closed document isn't synchronized anymore and won't be re-used when the same resource is opened again.

Readonly isDirty

isDirty: boolean

true if there are unpersisted changes.

Readonly isUntitled

isUntitled: boolean

Is this document representing an untitled file which has never been saved yet. Note that this does not mean the document will be saved to disk, use uri.scheme to figure out where a document will be saved, e.g. file, ftp etc.

Readonly kernelSpec

kernelSpec: IKernelSpec

The spec for current kernel, if applicable. This will be undefined until a kernel has been started

Readonly providerId

providerId: string

The identifier of the Notebook provider associated with this document.

Readonly uri

uri: Uri

The associated uri for this notebook document.

Note that most documents use the file-scheme, which means they are files on disk. However, not all documents are saved on disk and therefore the scheme must be checked before trying to access the underlying file or siblings on disk.

Methods

save

  • save(): Thenable<boolean>
  • Save the underlying file.

    Returns Thenable<boolean>

    A promise that will resolve to true when the file has been saved. If the file was not dirty or the save failed, will return false.

validateCellRange

  • Ensure a cell range is completely contained in this document.

    Parameters

    Returns CellRange

    The given range or a new, adjusted range.

Generated using TypeDoc