Skip to content

Repository files navigation

Cloud Sync in C#

Windows APIs

Windows C++ from C#

Other options?

Samples/References

  • windows-classic-samples (c++)
    • A sample using a local directory as the "cloud"
    • Isn't actually a full implementation: does not move updates between "client" and "server" directories
  • C# with Vanara
    • a C# version of the windows-classic-samples CloudMirror using Vanara.PInvoke
    • Doesn't include IStorageProviderStatusUISource
  • IT HIT UserFileSystem
    • A product that abstracts Cloud Sync Engine
    • Helpful documentation about some of the Cloud Sync concepts
    • UserFileSystem sample

Architecture

  • BackgroundService
    • Sets client directory as search-indexable
    • Registers class objects for COM
    • Registers sync root at client directory
    • Connects to sync root events (e.g. fetch, rename, delete)
    • Starts watch for changes in client directory (to hydrate/dehydrate on attribute change, and to update remote)
    • Starts watch for changes in remote directory (to update client)
    • Wait for SIGTERM (ctrl+c)
    • Dispose/unregister watchers, sync root events, sync root, COM class objects
  • Updating remote: IRemoteReadWriteService
  • Updating client: PlaceholderService

Helpers

Shell Extensions and MSIX

TODO

  • Implement IStorageProviderStatusUISource
  • Icon images
    • App (CloudSync.Package/Images)
    • Tray (TrayIconResource.xaml)
    • Directory (SyncRootRegistrar.cs)
  • SFTP thumbnail provider
  • Verify shell commands work; complete additional Shell commands
    • Sync From Cloud (Re-fetch placeholders and data)
    • Reupload From Cloud
  • Convert to https://github.com/microsoft/CsWin32?

SyncRootConnector

  • Cancel FetchData/FetchPlaceholders

Local Server

  • Changes (create, update, rename, delete) while offline -> ?

Add/Remove sync root through app

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

About

Sync Windows directory with remote directory using Windows Cloud Files API

Topics

Resources

Stars

12 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages