StatVfsRequest.cs 926 B

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