I use sync framework 2.1 to sync two-way between an ordinary file system folder and an encrypted folder, using a SyncDataConverter to do the encryption/decryption of the files in the two folders. Users might work in the unencrypted local folder, and encrypted
files and folders might come from a remote location running the same application.
In addition to the encrypted files, each encrypted folder and subfolder contain an encrypted metadata file. My problem arises when I want to encrypt a new folder, which should create both an encrypted folder and the encrypted metadata file. If I add
the metadata file explicitly, the sync framework discovers the new metadata file and acts as if this is a newly added encrypted file, which it in turn tries to decrypt and create a decrypted folder out of. How could I stop sync framework from acting on this
file? I do not want to create an exclude filter on the metadata file, because the metadata files can change when they arrive from the remote location and need to be handled.
A related problem is to act on changes in the metadata file. This metadata file contains (among other things) an encrypted version of the name of the folder it resides in. When the this name is changed, I would like to produce a Rename event on the unencrypted
folder, but I cannot find out how to do this, since the encrypted folder or the metadata file itself aren't actually renamed, so the ApplyingChange event's e.ChangeType isn't Rename.
Is the answer to both these problems that I need to create my own SyncProvider(s), or can I still use the FileSyncProvider, and if so, how?