Class: Changeset
A comparison between two directories representing changes that can be applied.
Extends​
BaseClient
Constructors​
Constructor​
new Changeset(
ctx?
,_id?
,_sync?
):Changeset
Constructor is used for internal usage only, do not create object from it.
Parameters​
ctx?​
Context
_id?​
_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​
id()​
id():
Promise
<ChangesetID
>
A unique identifier for this Changeset.
Returns​
Promise
<ChangesetID
>
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
>