SftpRmDirRequest.cs 903 B

123456789101112131415161718192021222324252627282930313233343536
  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 SftpRmDirRequest : SftpRequest
  9. {
  10. public override SftpMessageTypes SftpMessageType
  11. {
  12. get { return SftpMessageTypes.RmDir; }
  13. }
  14. public string Path { get; private set; }
  15. public SftpRmDirRequest(uint requestId, string path, Action<SftpStatusResponse> statusAction)
  16. : base(requestId, statusAction)
  17. {
  18. this.Path = path;
  19. }
  20. protected override void LoadData()
  21. {
  22. base.LoadData();
  23. this.Path = this.ReadString();
  24. }
  25. protected override void SaveData()
  26. {
  27. base.SaveData();
  28. this.Write(this.Path);
  29. }
  30. }
  31. }