Class: Changeset
A comparison between two directories representing changes that can be applied.
Extends​
BaseClient
Constructors​
Constructor​
new Changeset(
ctx?,_id?,_export?,_isEmpty?,_sync?):Changeset
Constructor is used for internal usage only, do not create object from it.
Parameters​
ctx?​
Context
_id?​
_export?​
string
_isEmpty?​
boolean
_sync?​
Returns​
Changeset
Overrides​
BaseClient.constructor
Methods​
addedPaths()​
addedPaths():
Promise<string[]>
Files and directories that were added in the newer directory.
Returns​
Promise<string[]>
after()​
after():
Directory
The newer/upper snapshot.
Returns​
asPatch()​
asPatch():
File
Return a Git-compatible patch of the changes
Returns​
before()​
before():
Directory
The older/lower snapshot to compare against.
Returns​
export()​
export(
path):Promise<string>
Applies the diff represented by this changeset to a path on the host.
Parameters​
path​
string
Location of the copied directory (e.g., "logs/").
Returns​
Promise<string>
id()​
id():
Promise<ChangesetID>
A unique identifier for this Changeset.
Returns​
Promise<ChangesetID>
isEmpty()​
isEmpty():
Promise<boolean>
Returns true if the changeset is empty (i.e. there are no changes).
Returns​
Promise<boolean>
layer()​
layer():
Directory
Return a snapshot containing only the created and modified files
Returns​
modifiedPaths()​
modifiedPaths():
Promise<string[]>
Files and directories that existed before and were updated in the newer directory.
Returns​
Promise<string[]>
removedPaths()​
removedPaths():
Promise<string[]>
Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
Returns​
Promise<string[]>
sync()​
sync():
Promise<Changeset>
Force evaluation in the engine.
Returns​
Promise<Changeset>