Skip to content

Commit 36f94c2

Browse files
committed
Move StatVfsResponse to tests.
1 parent b548622 commit 36f94c2

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

src/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,39 @@ public StatVfsResponse Build()
132132
};
133133
}
134134
}
135+
136+
internal class StatVfsResponse : SftpExtendedReplyResponse
137+
{
138+
public SftpFileSytemInformation Information { get; set; }
139+
140+
public StatVfsResponse(uint protocolVersion)
141+
: base(protocolVersion)
142+
{
143+
}
144+
145+
protected override void LoadData()
146+
{
147+
base.LoadData();
148+
149+
Information = new SftpFileSytemInformation(ReadUInt64(), // FileSystemBlockSize
150+
ReadUInt64(), // BlockSize
151+
ReadUInt64(), // TotalBlocks
152+
ReadUInt64(), // FreeBlocks
153+
ReadUInt64(), // AvailableBlocks
154+
ReadUInt64(), // TotalNodes
155+
ReadUInt64(), // FreeNodes
156+
ReadUInt64(), // AvailableNodes
157+
ReadUInt64(), // Sid
158+
ReadUInt64(), // Flags
159+
ReadUInt64() // MaxNameLenght
160+
);
161+
}
162+
163+
protected override void SaveData()
164+
{
165+
base.SaveData();
166+
167+
Information.SaveData(DataStream);
168+
}
169+
}
135170
}

src/Renci.SshNet/Renci.SshNet.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@
417417
<Compile Include="Sftp\Responses\SftpResponse.cs" />
418418
<Compile Include="Sftp\Responses\SftpStatusResponse.cs" />
419419
<Compile Include="Sftp\Responses\SftpVersionResponse.cs" />
420-
<Compile Include="Sftp\Responses\StatVfsResponse.cs" />
421420
<Compile Include="Sftp\SftpCloseAsyncResult.cs" />
422421
<Compile Include="Sftp\SftpDownloadAsyncResult.cs" />
423422
<Compile Include="Sftp\SftpFile.cs" />

src/Renci.SshNet/Sftp/Responses/StatVfsResponse.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)