GitHub - PrimalZed/CloudSync: Sync Windows directory with remote directory using Windows Cloud Files API (original) (raw)

Cloud Sync in C#

Windows APIs

Windows C++ from C#

Other options?

Samples/References

Architecture

Helpers

Shell Extensions and MSIX

TODO

[x] Allow SyncRoot PopulationPolicy Full (on-demand placeholder creation) [x] Anticipate file conflict. Is it ok to resolve with newer LastWrittenTime? etag (hash) would be better, but would need to maintain state [] Queue changes until closed [] Convert to https://github.com/microsoft/CsWin32? [] Manager and windows service? [] "Manager" UI app to view, add, remove sync roots and backing services [] Persisted data? [] Windows service [] Shell? How to integrate with MSIX registration - does there need to be only one shell registration for all sync roots? [] Restart crashed sync roots? [] Each sync root as separate service?

SyncProvider / ClientWatcher

[] Cancel FetchData/FetchPlaceholders [x] Create events DTO for ConnectSyncRoot [x] New client file -> cloud storage provider [x] Convert to placeholder [x] Mark as in-sync [x] Don't dehydrate client [x] Update - FileSystemWatcher Changed is very chatty, and no way to really check what changed on the file Compare LastWritten to server? [x] Rename [x] Delete [] Combine SyncProvider and ClientWatcher?

Local Server

[x] New server file -> New placeholder [x] Don't hydrate client [x] Update server file -> ? [x] Rehydrate downloaded file [x] Update Pinned file without unpinning it [x] Update offline file (for some reason causing a Fetch that throws a 380 error) [] Update downloaded file when can't obtain lock (clear in sync, separate interval process to attempt sync) [x] Rename server file -> ? [x] Delete server file -> ? [] Changes (create, update, rename, delete) while offline -> ?

Syncing

Add/Remove sync root through app

[] Start [] Sync changes since last time service ran (offline, stopped) [] Uninstall [] Unregister sync roots