Gert Driesen
bc080e8c1b
Prepare for 2016.1.0-beta2.
2017-08-16 19:23:14 +02:00
Gert Driesen
b34e1c05a4
Do not set DEBUG and TRACE for Release config.
2017-08-16 18:58:24 +02:00
Gert Driesen
8f777f1fc7
SftpClient: Document that the following overloads create the specified file if it does not already exist:
...
AppendAllLines
AppendAllText
AppendText
2017-08-16 10:36:07 +02:00
Gert Driesen
1b21b6dd14
To improve compatibility of SftpClient with System.IO.File, the following methods now use UTF-8 encoding without a Byte-Order Mark (BOM):
...
void AppendAllLines(string path, IEnumerable<string> contents)
void AppendAllText(string path, string contents)
StreamWriter AppendText(string path)
StreamWriter CreateText(string path)
void WriteAllLines(string path, IEnumerable<string> contents)
void WriteAllLines(string path, string[] contents)
void WriteAllText(string path, string contents)
2017-08-16 10:31:10 +02:00
Gert Driesen
79c9a4baea
SftpFileStream: Position in stream should be left untouched when clearing read buffer.
2017-08-16 08:56:33 +02:00
Gert Driesen
30054463e1
Sync project file.
2017-08-14 20:35:21 +02:00
Gert Driesen
9444f21461
Added more tests for SftpFileStream.SetLength(long).
2017-08-14 20:23:01 +02:00
Gert Driesen
7bc67f3aca
Harden tests.
2017-08-13 21:36:55 +02:00
Gert Driesen
48205c7f6d
Improve SetLength compatibility with FileStream:
...
* Flush any buffers before epand or shrink the stream.
* If the specified value is less than the current length of the stream, the current position is moved to the last byte of the stream.
2017-08-13 15:05:44 +02:00
Gert Driesen
f38c7ce3af
SftpFileStream: In Append mode, create the remote file if it does not already exist.
...
SftpFileStream: In Append mode, create the remote file if it does not
already exist.
Fixes issue #266 .
2017-08-13 13:41:33 +02:00
Gert Driesen
c2552e4e4b
SftpFileStream:
...
Only allow Append mode when combined with write-only access.
Fixes issue #267 .
2017-08-13 13:41:33 +02:00
Gert Driesen
ea36b240aa
Reduce allocations.
2017-08-13 13:41:33 +02:00
Gert Driesen
b4841baa10
Do not create a List.
2017-08-13 13:41:33 +02:00
Gert Driesen
e30319a848
Sync project files.
2017-08-06 22:06:02 +02:00
Gert Driesen
36f94c26cc
Move StatVfsResponse to tests.
2017-08-06 21:54:59 +02:00
Gert Driesen
b548622524
Rename (I)SftpMessageFactory to (I)SftpResponseFactory.
2017-08-06 20:11:09 +02:00
Gert Driesen
e2cf28a28d
Remove Encoding from SubsystemSession and NetConfSession, and move it to SftpSession (as it is only used there).
...
Refactor creation of SFTP response messages to a SftpResponseFactory.
Implement SaveData for a few SFTP response messages.
2017-08-06 18:33:28 +02:00
Gert Driesen
9ecfa0d38c
Refactor loading of a response to an extended request (SSH_FXP_EXTENDED):
...
Continue reading from SshDataStream instead of creating new instance for type specific part.
2017-08-06 18:22:44 +02:00
Gert Driesen
3e1dd2d345
Added CryptoAbstraction.GenerateRandom(int length) method.
2017-08-06 17:54:47 +02:00
Gert Driesen
f90131229a
Fix doc.
2017-07-30 13:56:48 +02:00
Gert Driesen
216f364587
Update comments.
2017-07-30 13:55:54 +02:00
Gert Driesen
385b8a6c28
Increase initial window size for SSH channels from 2 MB to 2147483647 (2^31 - 1) bytes.
2017-07-29 15:29:47 +02:00
Gert Driesen
cc04517efd
Use BE methods on Pack.
2017-07-29 11:04:37 +02:00
Gert Driesen
7c05bd19ba
Increase max. SSH packet size back to 68536 (64 KB + 3000).
2017-07-23 21:54:58 +02:00
Gert Driesen
ea47d9db98
Fix xml doc.
2017-07-23 20:45:23 +02:00
Gert Driesen
e86fd18b21
Limit size of SSH packet to 35.000 bytes.
...
Improve documentation of LocalChannelDataPacketSize.
2017-07-23 20:43:11 +02:00
Gert Driesen
fa640e12a5
Improve documentation of LocalPacketSize.
2017-07-23 20:41:54 +02:00
Gert Driesen
55e31b1e7b
Sync project file
2017-07-16 22:03:06 +02:00
Gert Driesen
17a9c61464
Use langversion 5 for .NET Core project.
2017-07-16 20:06:53 +02:00
Gert Driesen
b680765692
Add comment to clarify that StreamReader uses a buffer size of 1024 bytes.
2017-07-16 20:06:12 +02:00
Gert Driesen
5408aace90
Avoid reading from the server twice to determine EOF.
...
When a server returns less number of bytes than the read buffer size, this *may* indicate that EOF has been reached. A subsequent (SSH_FXP_READ) server request is necessary to make sure EOF has effectively been reached.
Breaking out of the read loop avoids reading from the server twice to determine EOF: once in the read loop,
and once upon the next Read or ReadByte invocation.
2017-07-16 20:04:58 +02:00
Gert Driesen
416f7be804
Ensure write buffer is initialized before attempting to use it.
2017-06-17 12:33:04 +02:00
Gert Driesen
5dda8f5247
Merge branch 'sftpfilestream' of https://github.com/sshnet/SSH.NET into sftpfilestream
2017-06-12 22:29:21 +02:00
Gert Driesen
c83188a5a9
Harden test.
2017-06-12 22:29:16 +02:00
Gert Driesen
50ea405d5a
Sync project file.
2017-06-12 21:35:13 +02:00
Gert Driesen
6fd1cc78c3
Update Read(byte[] buffer, int offset, int count) to not write bytes to read buffer when the read buffer is empty and count is greater than the number of bytes read from the server.
...
Lazily initialize read and write buffer.
2017-06-12 21:15:23 +02:00
Gert Driesen
40efaa6e5a
Move back to writing all read bytes to read buffer, not only those that exceed the user supplied buffer.
2017-06-05 19:10:49 +02:00
Gert Driesen
bcc8def223
No longer track write position separately.
...
Reading from the SftpFileStream will not also affect the position at which a subsequent write will be performed.
The position at which a write is performed in the server file is now always the current position minus the position in the buffer.
2017-03-19 20:37:14 +01:00
Gert Driesen
99fd7b460f
Add tests for SftpFileStream.Seek(...).
2017-03-19 16:42:46 +01:00
Gert Driesen
30e8513800
Revert "Update SftFileStream to work correctly with mixed Read, Write and Seek operation, complete rewrite #194 "
...
This reverts commit 0d88ddc79c .
2017-03-17 19:59:22 +01:00
olegkap
0d88ddc79c
Update SftFileStream to work correctly with mixed Read, Write and Seek operation, complete rewrite #194
2017-03-10 22:05:15 -05:00
Gert Driesen
d93f064c0f
Attempt to harden test.
2017-03-08 20:13:11 +01:00
Gert Driesen
5f1494f09e
Added test to verify that dispose has completed.
2017-03-08 20:00:13 +01:00
Gert Driesen
ff68b38109
Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop
2017-03-08 19:44:50 +01:00
Gert Driesen
f6daa4dfa6
Enable HandleShouldHaveBeenClosed test.
2017-03-08 19:44:44 +01:00
Gert Driesen
b3e704b404
Sync .NET 3.5 test project file, and remove usage of string interpolation.
2017-03-05 21:56:38 +01:00
Gert Driesen
14b571fdd4
Update tests now that we reject invalid combination of FileMode and FileAccess.
...
Remove duplicate tests.
2017-03-05 21:42:37 +01:00
Gert Driesen
ff78430ed4
Move null check into FEATURE_THREAD_THREADPOOL section.
2017-03-05 18:54:28 +01:00
Gert Driesen
04ca23176a
Merge pull request #186 from agayardo/develop
...
Fix for recently introduced regression in SftpFileStream.Read(...).
2017-03-05 18:47:47 +01:00
Gert Driesen
d3635d18fa
Added test for recently introduced regression that is fixed by PR #186 .
2017-03-05 18:47:01 +01:00