Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

File Synchronization Protocol

Ana Andrișan edited this page Jun 8, 2022 · 12 revisions
File{
    "name": String;
    "modified": long;
}

Directory{
    "directories": Directory[];
    "files": File[];
}

Request{
    "root": Directory;
    "rootPath": String;
    "action": Sync|Fetch|Delete;
}

Actions

They model the interactions between connected devices. Every device can receive three different requests from another device; each can target the entire shared folder (root), a subfolder or even a single file:

1. Fetch:

The receiving device will compare it's own files to the ones of the sender, and then it will send all new(er) files from the specified location back to the device that sent the request.

2. Sync:

The receiving device will initially treat this request as a "Fetch" request. After that, it will then send a similar "Fetch" request back to the initial sender.

3. Delete:

The receiving device will delete all files from a specified location.


Clone this wiki locally