Construct a new document manager.
ReadonlyregistryThe registry used by the manager.
ReadonlyservicesThe service manager used by the manager.
ProtectedtranslatorWhether to autosave documents.
Whether to autosave documents.
Determines the time interval for autosave in seconds.
Determines the time interval for autosave in seconds.
Whether to ask confirmation to close a tab or not.
Whether to ask confirmation to close a tab or not.
Get whether the document manager has been disposed.
Defines max acceptable difference, in milliseconds, between last modified timestamps on disk and client
Defines max acceptable difference, in milliseconds, between last modified timestamps on disk and client.
Whether to ask the user to rename untitled file on first manual save.
Whether to ask the user to rename untitled file on first manual save.
Signal triggered when an attribute changes.
Protected_onClone a widget.
The source widget.
A new widget or undefined.
Uses the same widget factory and context as the source, or returns
undefined if the source widget is not managed by this manager.
Get the document context for a widget.
The widget of interest.
The context associated with the widget, or undefined if no such
context exists.
Create a new file and return the widget used to view it.
The created widget, or undefined.
This function will return undefined if a valid widget factory
cannot be found.
Delete a file.
The full path to the file to be deleted.
A promise which resolves when the file is deleted.
If there is a running session associated with the file and no other sessions are using the kernel, the session will be shut down.
See if a widget already exists for the given path and widget name.
The file path to use.
The name of the widget factory to use. 'default' will use the default widget.
The found widget, or undefined.
This can be used to find an existing widget instead of opening a new widget.
Create a new untitled file.
The file content creation options.
Open a file and return the widget used to view it.
The file path to open.
The name of the widget factory to use. 'default' will use the default widget.
Optionalkernel: Partial<Kernel.IModel>An optional kernel name/id to override the default.
Optionaloptions: IOpenOptionsOptionalkernelPreference: IKernelPreferenceThe created widget, or undefined.
This function will return undefined if a valid widget factory
cannot be found.
Open a file and return the widget used to view it. Reveals an already existing editor.
The file path to open.
The name of the widget factory to use. 'default' will use the default widget.
Optionalkernel: Partial<Kernel.IModel>An optional kernel name/id to override the default.
Optionaloptions: IOpenOptionsOptionalkernelPreference: IKernelPreferenceThe created widget, or undefined.
This function will return undefined if a valid widget factory
cannot be found.
Rename a file or directory.
The full path to the original file.
The full path to the new file.
A promise containing the new file contents model. The promise will reject if the newPath already exists. Use [[overwrite]] to overwrite a file.
The document manager.
Notes
The document manager is used to register model and widget creators, and the file browser uses the document manager to create widgets. The document manager maintains a context for each path and model type that is open, and a list of widgets for each context. The document manager is in control of the proper closing and disposal of the widgets and contexts.