Construct a new contents manager object.
Optional
options: ContentsManager.IOptionsThe options used to initialize the object.
Private
_additionalPrivate
_defaultPrivate
_driveGiven a path, get the IDrive to which it refers, where the path satisfies the pattern
'driveName:path/to/file'. If there is no
driveName`
prepended to the path, it returns the default drive.
@param path: a path to a file.
@returns A tuple containing an IDrive
object for the path,
and a local path for that drive.
Private
_filePrivate
_isPrivate
_onRespond to fileChanged signals from the drives attached to the manager. This prepends the drive name to the path if necessary, and then forwards the signal.
Private
_toGiven a drive and a local path, construct a fully qualified
path. The inverse of _driveForPath
.
an IDrive
.
the local path on the drive.
the fully qualified path.
Readonly
serverThe server settings associated with the manager.
A signal emitted when a file operation takes place.
Test whether the manager has been disposed.
Add an IDrive
to the manager.
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.
Given a path, get a shared model factory from the
relevant backend. Returns null
if the backend
does not provide one.
List available checkpoints for a file.
The path of the file.
A promise which resolves with a list of checkpoint models for the file.
Resolve a global path, starting from the root path. Behaves like posix-path.resolve, with 3 differences:
The normalized path.
Generated using TypeDoc
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.