add push procedure

This commit is contained in:
grimhilt 2023-06-11 17:58:00 +02:00
parent c4bcebe677
commit b914dde525

View File

@ -1,32 +1,14 @@
## Push ## Push
```mermaid 1. Get list of file and folder to push from ``.nextsync/index``
flowchart TD 2. For each object in the list:
A[Start] --> G[Get staged objects] * If it is a file:
G --> GNO[Get next object] * Check if the file exists on the server
GNO --> H{Object empty ?} * If a collision occurs, compare the modification date (given by the file blob and the server)
H --> |No| B{Is a directory ?} * If it is more recent download the file under with ``.dist`` extension
H ----> |Yes| F[End] * Else overwrite the file
B --> |Yes| C[Push Folder] * If not collision occurs, upload the file
B --> |No| E[Push File] * If is it a folder:
C --> GNO * If the folder exists on the server apply this procedure for its content
E --> GNO * Else upload it
```
## Pushing a folder
```mermaid
flowchart TD
A[Start] --> B{Is local folder older than the server one ?}
```
## Pushing a file
```mermaid
```