Răsfoiți Sursa

Rename SftpFileSytemInformation to SftpFileSystemInformation (#1425)

Dejan Varmedja 1 an în urmă
părinte
comite
830e504244

+ 5 - 5
src/Renci.SshNet/ISftpClient.cs

@@ -665,12 +665,12 @@ namespace Renci.SshNet
         /// </summary>
         /// <param name="path">The path.</param>
         /// <returns>
-        /// A <see cref="SftpFileSytemInformation"/> instance that contains file status information.
+        /// A <see cref="SftpFileSystemInformation"/> instance that contains file status information.
         /// </returns>
         /// <exception cref="SshConnectionException">Client is not connected.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="path" /> is <see langword="null"/>.</exception>
         /// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
-        SftpFileSytemInformation GetStatus(string path);
+        SftpFileSystemInformation GetStatus(string path);
 
         /// <summary>
         /// Asynchronously gets status using statvfs@openssh.com request.
@@ -678,13 +678,13 @@ namespace Renci.SshNet
         /// <param name="path">The path.</param>
         /// <param name="cancellationToken">The <see cref="CancellationToken"/> to observe.</param>
         /// <returns>
-        /// A <see cref="Task{SftpFileSytemInformation}"/> that represents the status operation.
-        /// The task result contains the <see cref="SftpFileSytemInformation"/> instance that contains file status information.
+        /// A <see cref="Task{SftpFileSystemInformation}"/> that represents the status operation.
+        /// The task result contains the <see cref="SftpFileSystemInformation"/> instance that contains file status information.
         /// </returns>
         /// <exception cref="SshConnectionException">Client is not connected.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="path" /> is <see langword="null"/>.</exception>
         /// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
-        Task<SftpFileSytemInformation> GetStatusAsync(string path, CancellationToken cancellationToken);
+        Task<SftpFileSystemInformation> GetStatusAsync(string path, CancellationToken cancellationToken);
 
         /// <summary>
         /// Retrieves list of files in remote directory.

+ 2 - 2
src/Renci.SshNet/Sftp/ISftpSession.cs

@@ -370,7 +370,7 @@ namespace Renci.SshNet.Sftp
         /// The file system information for the specified path, or <see langword="null"/> when
         /// the request failed and <paramref name="nullOnError"/> is <see langword="true"/>.
         /// </returns>
-        SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = false);
+        SftpFileSystemInformation RequestStatVfs(string path, bool nullOnError = false);
 
         /// <summary>
         /// Asynchronously performs a <c>statvfs@openssh.com</c> extended request.
@@ -382,7 +382,7 @@ namespace Renci.SshNet.Sftp
         /// <see cref="Task{Task}.Result"/> contains the file system information for the specified
         /// path.
         /// </returns>
-        Task<SftpFileSytemInformation> RequestStatVfsAsync(string path, CancellationToken cancellationToken);
+        Task<SftpFileSystemInformation> RequestStatVfsAsync(string path, CancellationToken cancellationToken);
 
         /// <summary>
         /// Performs SSH_FXP_SYMLINK request.

+ 2 - 2
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

+ 3 - 3
src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs

@@ -6,7 +6,7 @@ namespace Renci.SshNet.Sftp
     /// Contains File system information exposed by statvfs@openssh.com request.
     /// </summary>
 #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 @@ namespace Renci.SshNet.Sftp
         public ulong MaxNameLenght { get; private set; }
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="SftpFileSytemInformation" /> class.
+        /// Initializes a new instance of the <see cref="SftpFileSystemInformation" /> class.
         /// </summary>
         /// <param name="bsize">The bsize.</param>
         /// <param name="frsize">The frsize.</param>
@@ -132,7 +132,7 @@ namespace Renci.SshNet.Sftp
         /// <param name="sid">The sid.</param>
         /// <param name="flag">The flag.</param>
         /// <param name="namemax">The namemax.</param>
-        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;

+ 10 - 10
src/Renci.SshNet/Sftp/SftpSession.cs

@@ -1987,9 +1987,9 @@ namespace Renci.SshNet.Sftp
         /// <param name="path">The path.</param>
         /// <param name="nullOnError">if set to <see langword="true"/> [null on error].</param>
         /// <returns>
-        /// A <see cref="SftpFileSytemInformation"/> for the specified path.
+        /// A <see cref="SftpFileSystemInformation"/> for the specified path.
         /// </returns>
-        public SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = false)
+        public SftpFileSystemInformation RequestStatVfs(string path, bool nullOnError = false)
         {
             if (ProtocolVersion < 3)
             {
@@ -1998,7 +1998,7 @@ namespace Renci.SshNet.Sftp
 
             SshException exception = null;
 
-            SftpFileSytemInformation information = null;
+            SftpFileSystemInformation information = null;
 
             using (var wait = new AutoResetEvent(initialState: false))
             {
@@ -2045,7 +2045,7 @@ namespace Renci.SshNet.Sftp
         /// <see cref="Task{Task}.Result"/> contains the file system information for the specified
         /// path.
         /// </returns>
-        public async Task<SftpFileSytemInformation> RequestStatVfsAsync(string path, CancellationToken cancellationToken)
+        public async Task<SftpFileSystemInformation> RequestStatVfsAsync(string path, CancellationToken cancellationToken)
         {
             if (ProtocolVersion < 3)
             {
@@ -2054,12 +2054,12 @@ namespace Renci.SshNet.Sftp
 
             cancellationToken.ThrowIfCancellationRequested();
 
-            var tcs = new TaskCompletionSource<SftpFileSytemInformation>(TaskCreationOptions.RunContinuationsAsynchronously);
+            var tcs = new TaskCompletionSource<SftpFileSystemInformation>(TaskCreationOptions.RunContinuationsAsynchronously);
 
 #if NET || NETSTANDARD2_1_OR_GREATER
-            await using (cancellationToken.Register(s => ((TaskCompletionSource<SftpFileSytemInformation>)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false).ConfigureAwait(continueOnCapturedContext: false))
+            await using (cancellationToken.Register(s => ((TaskCompletionSource<SftpFileSystemInformation>)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false).ConfigureAwait(continueOnCapturedContext: false))
 #else
-            using (cancellationToken.Register(s => ((TaskCompletionSource<SftpFileSytemInformation>)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false))
+            using (cancellationToken.Register(s => ((TaskCompletionSource<SftpFileSystemInformation>)s).TrySetCanceled(cancellationToken), tcs, useSynchronizationContext: false))
 #endif // NET || NETSTANDARD2_1_OR_GREATER
             {
                 SendRequest(new StatVfsRequest(ProtocolVersion,
@@ -2079,10 +2079,10 @@ namespace Renci.SshNet.Sftp
         /// <param name="handle">The file handle.</param>
         /// <param name="nullOnError">if set to <see langword="true"/> [null on error].</param>
         /// <returns>
-        /// A <see cref="SftpFileSytemInformation"/> for the specified path.
+        /// A <see cref="SftpFileSystemInformation"/> for the specified path.
         /// </returns>
         /// <exception cref="NotSupportedException">This operation is not supported for the current SFTP protocol version.</exception>
-        internal SftpFileSytemInformation RequestFStatVfs(byte[] handle, bool nullOnError = false)
+        internal SftpFileSystemInformation RequestFStatVfs(byte[] handle, bool nullOnError = false)
         {
             if (ProtocolVersion < 3)
             {
@@ -2091,7 +2091,7 @@ namespace Renci.SshNet.Sftp
 
             SshException exception = null;
 
-            SftpFileSytemInformation information = null;
+            SftpFileSystemInformation information = null;
 
             using (var wait = new AutoResetEvent(initialState: false))
             {

+ 5 - 5
src/Renci.SshNet/SftpClient.cs

@@ -1170,12 +1170,12 @@ namespace Renci.SshNet
         /// </summary>
         /// <param name="path">The path.</param>
         /// <returns>
-        /// A <see cref="SftpFileSytemInformation"/> instance that contains file status information.
+        /// A <see cref="SftpFileSystemInformation"/> instance that contains file status information.
         /// </returns>
         /// <exception cref="SshConnectionException">Client is not connected.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="path" /> is <see langword="null"/>.</exception>
         /// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
-        public SftpFileSytemInformation GetStatus(string path)
+        public SftpFileSystemInformation GetStatus(string path)
         {
             CheckDisposed();
 
@@ -1200,13 +1200,13 @@ namespace Renci.SshNet
         /// <param name="path">The path.</param>
         /// <param name="cancellationToken">The <see cref="CancellationToken"/> to observe.</param>
         /// <returns>
-        /// A <see cref="Task{SftpFileSytemInformation}"/> that represents the status operation.
-        /// The task result contains the <see cref="SftpFileSytemInformation"/> instance that contains file status information.
+        /// A <see cref="Task{SftpFileSystemInformation}"/> that represents the status operation.
+        /// The task result contains the <see cref="SftpFileSystemInformation"/> instance that contains file status information.
         /// </returns>
         /// <exception cref="SshConnectionException">Client is not connected.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="path" /> is <see langword="null"/>.</exception>
         /// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
-        public async Task<SftpFileSytemInformation> GetStatusAsync(string path, CancellationToken cancellationToken)
+        public async Task<SftpFileSystemInformation> GetStatusAsync(string path, CancellationToken cancellationToken)
         {
             CheckDisposed();
 

+ 1 - 1
test/Renci.SshNet.Tests/Classes/Sftp/SftpSessionTest_Connected_RequestStatVfs.cs

@@ -35,7 +35,7 @@ namespace Renci.SshNet.Tests.Classes.Sftp
         private StatVfsResponse _sftpStatVfsResponse;
         private ulong _bAvail;
         private string _path;
-        private SftpFileSytemInformation _actual;
+        private SftpFileSystemInformation _actual;
 
         [TestInitialize]
         public void Setup()

+ 7 - 7
test/Renci.SshNet.Tests/Classes/Sftp/SftpStatVfsResponseBuilder.cs

@@ -89,11 +89,11 @@ namespace Renci.SshNet.Tests.Classes.Sftp
         {
             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 @@ namespace Renci.SshNet.Tests.Classes.Sftp
         {
             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 @@ namespace Renci.SshNet.Tests.Classes.Sftp
 
         public StatVfsResponse Build()
         {
-            var fileSystemInfo = new SftpFileSytemInformation(_bsize,
+            var fileSystemInfo = new SftpFileSystemInformation(_bsize,
                                                               _frsize,
                                                               _blocks,
                                                               _bfree,
@@ -148,7 +148,7 @@ namespace Renci.SshNet.Tests.Classes.Sftp
             get { return SftpMessageTypes.ExtendedReply; }
         }
 
-        public SftpFileSytemInformation Information { get; set; }
+        public SftpFileSystemInformation Information { get; set; }
 
         public StatVfsResponse(uint protocolVersion)
             : base(protocolVersion)
@@ -159,7 +159,7 @@ namespace Renci.SshNet.Tests.Classes.Sftp
         {
             base.LoadData();
 
-            Information = new SftpFileSytemInformation(ReadUInt64(), // FileSystemBlockSize
+            Information = new SftpFileSystemInformation(ReadUInt64(), // FileSystemBlockSize
                                                        ReadUInt64(), // BlockSize
                                                        ReadUInt64(), // TotalBlocks
                                                        ReadUInt64(), // FreeBlocks