StatVfsRequest.cs 939 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using Renci.SshNet.Sftp.Responses;
  3. namespace Renci.SshNet.Sftp.Requests
  4. {
  5. internal class StatVfsRequest : SftpExtendedRequest
  6. {
  7. public override SftpMessageTypes SftpMessageType
  8. {
  9. get { return SftpMessageTypes.Extended; }
  10. }
  11. public override string Name
  12. {
  13. get { return "statvfs@openssh.com"; }
  14. }
  15. public string Path { get; private set; }
  16. public StatVfsRequest(uint protocolVersion, uint requestId, string path, Action<SftpExtendedReplyResponse> extendedAction, Action<SftpStatusResponse> statusAction)
  17. : base(protocolVersion, requestId, statusAction)
  18. {
  19. this.Path = path;
  20. this.SetAction(extendedAction);
  21. }
  22. protected override void SaveData()
  23. {
  24. base.SaveData();
  25. this.Write(this.Path);
  26. }
  27. }
  28. }