From da077bc8a9d5f20e543bedda9bf1a4a95ecc0566 Mon Sep 17 00:00:00 2001 From: Dejan Varmedja <114813331+fndejan@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:49:14 +0200 Subject: [PATCH] Rename SftpFileSytemInformation to SftpFileSystemInformation --- src/Renci.SshNet/ISftpClient.cs | 10 +++++----- src/Renci.SshNet/Sftp/ISftpSession.cs | 4 ++-- .../ExtendedReplies/StatVfsReplyInfo.cs | 4 ++-- .../Sftp/SftpFileSystemInformation.cs | 6 +++--- src/Renci.SshNet/Sftp/SftpSession.cs | 20 +++++++++---------- src/Renci.SshNet/SftpClient.cs | 10 +++++----- ...ftpSessionTest_Connected_RequestStatVfs.cs | 2 +- .../Sftp/SftpStatVfsResponseBuilder.cs | 14 ++++++------- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Renci.SshNet/ISftpClient.cs b/src/Renci.SshNet/ISftpClient.cs index 133488fd1..a87a6a713 100644 --- a/src/Renci.SshNet/ISftpClient.cs +++ b/src/Renci.SshNet/ISftpClient.cs @@ -665,12 +665,12 @@ public interface ISftpClient : IBaseClient /// /// The path. /// - /// A instance that contains file status information. + /// A instance that contains file status information. /// /// Client is not connected. /// is . /// The method was called after the client was disposed. - SftpFileSytemInformation GetStatus(string path); + SftpFileSystemInformation GetStatus(string path); /// /// Asynchronously gets status using statvfs@openssh.com request. @@ -678,13 +678,13 @@ public interface ISftpClient : IBaseClient /// The path. /// The to observe. /// - /// A that represents the status operation. - /// The task result contains the instance that contains file status information. + /// A that represents the status operation. + /// The task result contains the instance that contains file status information. /// /// Client is not connected. /// is . /// The method was called after the client was disposed. - Task GetStatusAsync(string path, CancellationToken cancellationToken); + Task GetStatusAsync(string path, CancellationToken cancellationToken); /// /// Retrieves list of files in remote directory. diff --git a/src/Renci.SshNet/Sftp/ISftpSession.cs b/src/Renci.SshNet/Sftp/ISftpSession.cs index ed9b72369..e49936b7a 100644 --- a/src/Renci.SshNet/Sftp/ISftpSession.cs +++ b/src/Renci.SshNet/Sftp/ISftpSession.cs @@ -370,7 +370,7 @@ internal interface ISftpSession : ISubsystemSession /// The file system information for the specified path, or when /// the request failed and is . /// - SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = false); + SftpFileSystemInformation RequestStatVfs(string path, bool nullOnError = false); /// /// Asynchronously performs a statvfs@openssh.com extended request. @@ -382,7 +382,7 @@ internal interface ISftpSession : ISubsystemSession /// contains the file system information for the specified /// path. /// - Task RequestStatVfsAsync(string path, CancellationToken cancellationToken); + Task RequestStatVfsAsync(string path, CancellationToken cancellationToken); /// /// Performs SSH_FXP_SYMLINK request. diff --git a/src/Renci.SshNet/Sftp/Responses/ExtendedReplies/StatVfsReplyInfo.cs b/src/Renci.SshNet/Sftp/Responses/ExtendedReplies/StatVfsReplyInfo.cs index d7cecf8f9..dbda3b59f 100644 --- a/src/Renci.SshNet/Sftp/Responses/ExtendedReplies/StatVfsReplyInfo.cs +++ b/src/Renci.SshNet/Sftp/Responses/ExtendedReplies/StatVfsReplyInfo.cs @@ -4,11 +4,11 @@ namespace Renci.SshNet.Sftp.Responses { internal sealed class StatVfsReplyInfo : ExtendedReplyInfo { - public SftpFileSytemInformation Information { get; private set; } + public SftpFileSystemInformation Information { get; private set; } public override void LoadData(SshDataStream stream) { - Information = new SftpFileSytemInformation(stream.ReadUInt64(), // FileSystemBlockSize + Information = new SftpFileSystemInformation(stream.ReadUInt64(), // FileSystemBlockSize stream.ReadUInt64(), // BlockSize stream.ReadUInt64(), // TotalBlocks stream.ReadUInt64(), // FreeBlocks diff --git a/src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs b/src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs index 89d24a727..c9ae1abd4 100644 --- a/src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs +++ b/src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs @@ -6,7 +6,7 @@ namespace Renci.SshNet.Sftp /// Contains File system information exposed by statvfs@openssh.com request. /// #pragma warning disable SA1649 // File name should match first type name - public class SftpFileSytemInformation + public class SftpFileSystemInformation #pragma warning restore SA1649 // File name should match first type name { #pragma warning disable SA1310 // Field names should not contain underscore @@ -119,7 +119,7 @@ public bool SupportsSetUid public ulong MaxNameLenght { get; private set; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The bsize. /// The frsize. @@ -132,7 +132,7 @@ public bool SupportsSetUid /// The sid. /// The flag. /// The namemax. - internal SftpFileSytemInformation(ulong bsize, ulong frsize, ulong blocks, ulong bfree, ulong bavail, ulong files, ulong ffree, ulong favail, ulong sid, ulong flag, ulong namemax) + internal SftpFileSystemInformation(ulong bsize, ulong frsize, ulong blocks, ulong bfree, ulong bavail, ulong files, ulong ffree, ulong favail, ulong sid, ulong flag, ulong namemax) { FileSystemBlockSize = bsize; BlockSize = frsize; diff --git a/src/Renci.SshNet/Sftp/SftpSession.cs b/src/Renci.SshNet/Sftp/SftpSession.cs index 457ccaaee..7943d9a3c 100644 --- a/src/Renci.SshNet/Sftp/SftpSession.cs +++ b/src/Renci.SshNet/Sftp/SftpSession.cs @@ -1987,9 +1987,9 @@ public void RequestPosixRename(string oldPath, string newPath) /// The path. /// if set to [null on error]. /// - /// A for the specified path. + /// A for the specified path. /// - public SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = false) + public SftpFileSystemInformation RequestStatVfs(string path, bool nullOnError = false) { if (ProtocolVersion < 3) { @@ -1998,7 +1998,7 @@ public SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = f SshException exception = null; - SftpFileSytemInformation information = null; + SftpFileSystemInformation information = null; using (var wait = new AutoResetEvent(initialState: false)) { @@ -2045,7 +2045,7 @@ public SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = f /// contains the file system information for the specified /// path. /// - public async Task RequestStatVfsAsync(string path, CancellationToken cancellationToken) + public async Task RequestStatVfsAsync(string path, CancellationToken cancellationToken) { if (ProtocolVersion < 3) { @@ -2054,12 +2054,12 @@ public async Task RequestStatVfsAsync(string path, Can cancellationToken.ThrowIfCancellationRequested(); - var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); #if NET || NETSTANDARD2_1_OR_GREATER - await using (cancellationToken.Register(s => ((TaskCompletionSource)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false).ConfigureAwait(continueOnCapturedContext: false)) + await using (cancellationToken.Register(s => ((TaskCompletionSource)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false).ConfigureAwait(continueOnCapturedContext: false)) #else - using (cancellationToken.Register(s => ((TaskCompletionSource)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false)) + using (cancellationToken.Register(s => ((TaskCompletionSource)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false)) #endif // NET || NETSTANDARD2_1_OR_GREATER { SendRequest(new StatVfsRequest(ProtocolVersion, @@ -2079,10 +2079,10 @@ public async Task RequestStatVfsAsync(string path, Can /// The file handle. /// if set to [null on error]. /// - /// A for the specified path. + /// A for the specified path. /// /// This operation is not supported for the current SFTP protocol version. - internal SftpFileSytemInformation RequestFStatVfs(byte[] handle, bool nullOnError = false) + internal SftpFileSystemInformation RequestFStatVfs(byte[] handle, bool nullOnError = false) { if (ProtocolVersion < 3) { @@ -2091,7 +2091,7 @@ internal SftpFileSytemInformation RequestFStatVfs(byte[] handle, bool nullOnErro SshException exception = null; - SftpFileSytemInformation information = null; + SftpFileSystemInformation information = null; using (var wait = new AutoResetEvent(initialState: false)) { diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs index fb599220d..b82e605cc 100644 --- a/src/Renci.SshNet/SftpClient.cs +++ b/src/Renci.SshNet/SftpClient.cs @@ -1170,12 +1170,12 @@ public void EndUploadFile(IAsyncResult asyncResult) /// /// The path. /// - /// A instance that contains file status information. + /// A instance that contains file status information. /// /// Client is not connected. /// is . /// The method was called after the client was disposed. - public SftpFileSytemInformation GetStatus(string path) + public SftpFileSystemInformation GetStatus(string path) { CheckDisposed(); @@ -1200,13 +1200,13 @@ public SftpFileSytemInformation GetStatus(string path) /// The path. /// The to observe. /// - /// A that represents the status operation. - /// The task result contains the instance that contains file status information. + /// A that represents the status operation. + /// The task result contains the instance that contains file status information. /// /// Client is not connected. /// is . /// The method was called after the client was disposed. - public async Task GetStatusAsync(string path, CancellationToken cancellationToken) + public async Task GetStatusAsync(string path, CancellationToken cancellationToken) { CheckDisposed(); diff --git a/test/Renci.SshNet.Tests/Classes/Sftp/SftpSessionTest_Connected_RequestStatVfs.cs b/test/Renci.SshNet.Tests/Classes/Sftp/SftpSessionTest_Connected_RequestStatVfs.cs index 85243dfd1..d2f03f676 100644 --- a/test/Renci.SshNet.Tests/Classes/Sftp/SftpSessionTest_Connected_RequestStatVfs.cs +++ b/test/Renci.SshNet.Tests/Classes/Sftp/SftpSessionTest_Connected_RequestStatVfs.cs @@ -35,7 +35,7 @@ public class SftpSessionTest_Connected_RequestStatVfs private StatVfsResponse _sftpStatVfsResponse; private ulong _bAvail; private string _path; - private SftpFileSytemInformation _actual; + private SftpFileSystemInformation _actual; [TestInitialize] public void Setup() diff --git a/test/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs b/test/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs index 485ebe560..f9555e354 100644 --- a/test/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs +++ b/test/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs @@ -89,11 +89,11 @@ public SftpStatVfsResponseBuilder WithIsReadOnly(bool isReadOnly) { if (isReadOnly) { - _flag &= SftpFileSytemInformation.SSH_FXE_STATVFS_ST_RDONLY; + _flag &= SftpFileSystemInformation.SSH_FXE_STATVFS_ST_RDONLY; } else { - _flag |= SftpFileSytemInformation.SSH_FXE_STATVFS_ST_RDONLY; + _flag |= SftpFileSystemInformation.SSH_FXE_STATVFS_ST_RDONLY; } return this; @@ -103,11 +103,11 @@ public SftpStatVfsResponseBuilder WithSupportsSetUid(bool supportsSetUid) { if (supportsSetUid) { - _flag |= SftpFileSytemInformation.SSH_FXE_STATVFS_ST_NOSUID; + _flag |= SftpFileSystemInformation.SSH_FXE_STATVFS_ST_NOSUID; } else { - _flag &= SftpFileSytemInformation.SSH_FXE_STATVFS_ST_NOSUID; + _flag &= SftpFileSystemInformation.SSH_FXE_STATVFS_ST_NOSUID; } return this; @@ -121,7 +121,7 @@ public SftpStatVfsResponseBuilder WithNameMax(ulong nameMax) public StatVfsResponse Build() { - var fileSystemInfo = new SftpFileSytemInformation(_bsize, + var fileSystemInfo = new SftpFileSystemInformation(_bsize, _frsize, _blocks, _bfree, @@ -148,7 +148,7 @@ public override SftpMessageTypes SftpMessageType get { return SftpMessageTypes.ExtendedReply; } } - public SftpFileSytemInformation Information { get; set; } + public SftpFileSystemInformation Information { get; set; } public StatVfsResponse(uint protocolVersion) : base(protocolVersion) @@ -159,7 +159,7 @@ protected override void LoadData() { base.LoadData(); - Information = new SftpFileSytemInformation(ReadUInt64(), // FileSystemBlockSize + Information = new SftpFileSystemInformation(ReadUInt64(), // FileSystemBlockSize ReadUInt64(), // BlockSize ReadUInt64(), // TotalBlocks ReadUInt64(), // FreeBlocks