ComparisonDifference Class

Represents data about a single difference identified by Session.CompareDirectories method.


Namespace: WinSCP

public sealed class ComparisonDifference
Public NotInheritable Class ComparisonDifference


Name Description
SynchronizationAction Action Action needed to resolve the difference. Possible values are SynchronizationAction.UploadNew, SynchronizationAction.DownloadNew, SynchronizationAction.UploadUpdate, SynchronizationAction.DownloadUpdate, SynchronizationAction.DeleteRemote and SynchronizationAction.DeleteLocal. Read-only.
bool IsDirectory Does the difference involve file or directory? Read-only.
ComparisonFileInfo Local Information about a local file or a directory involved in the difference. Set for SynchronizationAction.UploadNew, SynchronizationAction.UploadUpdate, SynchronizationAction.DownloadUpdate and SynchronizationAction.DeleteLocal only. Not set (null) otherwise. Read-only.
ComparisonFileInfo Remote Information about a remote file or a directory involved in the difference. Set for SynchronizationAction.UploadUpdate, SynchronizationAction.DownloadNew, SynchronizationAction.DownloadUpdate and SynchronizationAction.DeleteRemote only. Not set (null) otherwise. Read-only.


Name Description
Resolve Resolves the difference by updating the local and/or remote files.
Reverse Reverses a direction of the difference.
ToString Returns string describing the difference. (Overrides Object.ToString().)
This feature is available only in the latest beta release.


This class can only be instantiated by the WinSCP assembly. To get an instance of the class, call Session.CompareDirectories.


See Session.CompareDirectories examples.

Last modified: by martin