capturegraph.data.save.commit
#
Commit - Save modified data back to a CaptureTarget#
Traverses a CaptureTarget (or Dict/List of modified data), checks for SaveOverWith and SaveIfMissing markers, and writes the values to disk in the correct locations based on the manifest.
Example
commit(target)
#
Commit all SaveOverWith and SaveIfMissing markers to disk.
Traverses the target data structure, finds all save markers, and writes the values to the appropriate file locations based on the manifest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Union[CaptureTarget, Dict]
|
A CaptureTarget or Dict with _path and _manifest attributes |
required |
Returns:
| Type | Description |
|---|---|
int
|
Number of files saved |