Good Morning World! I am just getting started with file synchronization using Microsoft.Synchronization.Files. Hopefully this will be an easy question for you more experienced synchronizers!
I'm essentially using the SyncFileSystemReplicasOneWay example from Microsoft's site. The method sets up a sourceProfider, a tartgetProvider, implements events for AppliedChange and SkippedChange, creates a SyncOrchestrator and assigns it's Local and
Remote providers, the direction (upload), and then runs the sync. This has some real potential for me in development for staging test servers. I have a build server and I intend to take particular builds and blast them out to a bunch of staging
servers for testing, but the staging servers need to "pull" the code down in a sequence that involves stopping application pools, running a bunch of other checks, and then running the synchronization.
First tests are looking fantastic and I'm really excited, but there are files left behind. I'm hoping to figure out a way to have the synchronization process eliminate outdated files, or files that don't exist in the source directory, without having
to manually remove them.
I checked the FileSyncOptions enumeration and that doesn't seem to have much for this scenario. I'm really hoping Microsoft thought of this when implementing this class, and that I'm just not finding it yet.
So to boil it down, I run a sync and files from source directory get copied to the target directory. The next time a sync occurs, if a file has been removed from the source directory, the previously synchronized file is left in the target directory.
RSync, for example, has options to remove these files. Does this framework have a similar option?
Thanks!
Joe