A grace time is accorded to deletion events before initiating any server-side deletion. In many programs (like Microsoft Word), deletion is often just a save: 1. Save data to temporary file ~wrdxxxx.tmp 2. Delete Example.doc 3. Rename ~wrdxxxx.tmp to Example.doc See https://support.microsoft.com/en-us/kb/211632 So, upon deletion, wait a bit for any save operation to hopefully finalize, then sync. This is not 100% foolproof, as saving can last for more than the grace time, but probably the best we can do without mind-reading third-party programs.
コード例 #1
0
ファイル: Watcher.cs プロジェクト: leclairn/CmisSync
        /// <summary>
        /// Constructor.
        /// </summary>
        public WatcherEvent(FileSystemEventArgs args)
        {
            this.args = args;

            // Start the grace time count.
            // A few seconds might have passed already, but we don't care since grace time is around tenfold that.
            grace = new Grace();
        }
コード例 #2
0
ファイル: Watcher.cs プロジェクト: aegif/CmisSync
        /// <summary>
        /// Constructor.
        /// </summary>
        public WatcherEvent(FileSystemEventArgs args)
        {
            this.args = args;

            // Start the grace time count.
            // A few seconds might have passed already, but we don't care since grace time is around tenfold that.
            grace = new Grace();
        }