High-level commands for synchronizing the state between a local folder and a remote directory in a DID Space. These commands simplify the complex process of keeping directories in sync by automatically detecting differences and executing the necessary operations.
Instead of manually tracking which files have been added, modified, or deleted, you can use a single Sync Command to apply all changes in one go. The SDK handles the comparison logic, determining the most efficient way to bring the target directory's state in line with the source directory's state.
Two primary commands are available for synchronization, depending on the direction of the data flow:
SyncFolderPushCommand
Pushes changes from a local folder to a remote directory. This is ideal for scenarios where your local file system is the source of truth, such as uploading a static website or backing up a project folder.
SyncFolderPullCommand
Pulls changes from a remote directory to a local folder. This is useful when the DID Space contains the authoritative version of the files and you need to download updates to a local machine.
Click on one of the commands above to see a detailed API reference, including input parameters, output structure, and complete, ready-to-use code examples.