Readonly
fileA signal emitted when a file operation takes place.
Readonly
isReadonly
serverThe server settings associated with the manager.
Create a checkpoint for a file.
The path of the file.
A promise which resolves with the new checkpoint model when the checkpoint is created.
Dispose of the resources held by the object.
If the object's dispose
method is called more than once, all
calls made after the first will be a no-op.
It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.
Get a file or directory.
The path to the file.
Optional
options: IFetchOptionsThe options used to fetch the file.
A promise which resolves with the file content.
Given a path, get a shared model IFactory from the
relevant backend. Returns null
if the backend
does not provide one.
Optional
options: IContentProvisionOptionsList available checkpoints for a file.
The path of the file.
A promise which resolves with a list of checkpoint models for the file.
Create a new untitled file or directory in the specified directory path.
Optional
options: Contents.ICreateOptionsThe options used to create the file.
A promise which resolves with the created file content when the file is created.
Resolve a global path, starting from the root path. Behaves like posix-path.resolve, with 3 differences:
the path.
The normalized path.
Save a file.
The desired file path.
Optional
options: Partial<Contents.IModel> & IContentProvisionOptionsOptional overrides to the model.
A promise which resolves with the file content model when the file is saved.
The interface for a contents manager.