I'm using Renci SSH.NET library for secure ftp connection. Now I have to check free disk space available on remote SFTP server. How can I do this?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
As Eugene commented, SFTP protocol version 6 lets one check available space (
SSH_FXP_EXTENDED
request namespace-available
).But Renci SSH.NET library supports SFTP protocol version 3 only. Also worth noting that most SSH/SFTP servers (notably OpenSSH, as the one the most widespread) support SFTP version 3 only too. So client-side support won't help much here.
As Salva has commented, OpenSSH on the other hand supports
statvfs@openssh.com
proprietary extension. And Renci SSH.NET library supports that too (viaSftpClient.GetStatus
). So if you are sure that you work against OpenSSH server, you can use that.