ComparisonDifference.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Globalization;
  3. using System.Runtime.InteropServices;
  4. using WinSCP;
  5. namespace WinSCP
  6. {
  7. [Guid("B1DAE3A0-5E56-4001-88D8-786F68557E28")]
  8. [ComVisible(true)]
  9. public enum SynchronizationAction
  10. {
  11. UploadNew = 1,
  12. DownloadNew = 2,
  13. UploadUpdate = 3,
  14. DownloadUpdate = 4,
  15. DeleteRemote = 5,
  16. DeleteLocal = 6,
  17. };
  18. [Guid("2D6EFFB5-69BA-47AA-90E8-A92953E8B58A")]
  19. [ComVisible(true)]
  20. public sealed class ComparisonFileInfo
  21. {
  22. public string FileName { get; internal set; }
  23. public DateTime LastWriteTime { get; internal set; }
  24. public long Length { get; internal set; }
  25. public int Length32 { get { return GetLength32(); } }
  26. internal ComparisonFileInfo()
  27. {
  28. }
  29. private int GetLength32()
  30. {
  31. return Tools.LengthTo32Bit(Length);
  32. }
  33. }
  34. [Guid("97F5222E-9379-4C24-9E50-E93C7334BBD5")]
  35. [ClassInterface(Constants.ClassInterface)]
  36. [ComVisible(true)]
  37. public sealed class ComparisonDifference
  38. {
  39. public SynchronizationAction Action { get; internal set; }
  40. public bool IsDirectory { get; internal set; }
  41. public ComparisonFileInfo Local { get; internal set; }
  42. public ComparisonFileInfo Remote { get; internal set; }
  43. internal ComparisonDifference()
  44. {
  45. }
  46. }
  47. }