Construct a new contents manager object.
The options used to initialize the object.
A signal emitted when a file operation takes place.
Test whether the manager has been disposed.
Copy a file into a given directory.
The destination directory path.
A promise which resolves with the new contents model when the file is copied.
The server will select the name of the copied file.
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.
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 factory from the relevant backend.
The factory defined on content provider best matching the given path
takes precedence over the factory defined on the drive as a whole.
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.
The 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.
A contents manager that passes file operations to the server. Multiple servers implementing the
IDrive
interface can be attached to the contents manager, so that the same session can perform file operations on multiple backends.This includes checkpointing with the normal file operations.