Renci.SshNet.ScpClient.InternalUpload C# (CSharp) Method

InternalUpload() private method

private InternalUpload ( IChannelSession channel, Stream input, DirectoryInfo directoryInfo ) : void
channel IChannelSession
input Stream
directoryInfo System.IO.DirectoryInfo
return void
        private void InternalUpload(IChannelSession channel, Stream input, DirectoryInfo directoryInfo)
        {
            //  Upload files
            var files = directoryInfo.GetFiles();
            foreach (var file in files)
            {
                InternalUpload(channel, input, file, file.Name);
            }

            //  Upload directories
            var directories = directoryInfo.GetDirectories();
            foreach (var directory in directories)
            {
                InternalSetTimestamp(channel, input, directoryInfo.LastWriteTimeUtc, directoryInfo.LastAccessTimeUtc);
                SendData(channel, string.Format("D0755 0 {0}\n", directory.Name));
                CheckReturnCode(input);

                InternalUpload(channel, input, directory);

                SendData(channel, "E\n");
                CheckReturnCode(input);
            }
        }

Same methods

ScpClient::InternalUpload ( IChannelSession channel, Stream input, FileInfo fileInfo, string filename ) : void
ScpClient::InternalUpload ( IChannelSession channel, Stream input, Stream source, string filename ) : void