SftpSymLinkRequest.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Renci.SshNet.Sftp.Responses;
  6. namespace Renci.SshNet.Sftp.Requests
  7. {
  8. internal class SftpSymLinkRequest : SftpRequest
  9. {
  10. public override SftpMessageTypes SftpMessageType
  11. {
  12. get { return SftpMessageTypes.SymLink; }
  13. }
  14. public string NewLinkPath { get; set; }
  15. public string ExistingPath { get; set; }
  16. public SftpSymLinkRequest(uint requestId, string newLinkPath, string existingPath, Action<SftpStatusResponse> statusAction)
  17. : base(requestId, statusAction)
  18. {
  19. this.NewLinkPath = newLinkPath;
  20. this.ExistingPath = existingPath;
  21. }
  22. protected override void LoadData()
  23. {
  24. base.LoadData();
  25. this.NewLinkPath = this.ReadString();
  26. this.ExistingPath = this.ReadString();
  27. }
  28. protected override void SaveData()
  29. {
  30. base.SaveData();
  31. this.Write(this.NewLinkPath);
  32. this.Write(this.ExistingPath);
  33. }
  34. }
  35. }