Renci.SshNet.SftpClient.AppendAllLines C# (CSharp) Method

AppendAllLines() public method

Appends lines to a file by using a specified encoding, and closes the file.
is null. -or- is null. -or- is null. Client is not connected. was not found on the remote host. The method was called after the client was disposed.
public AppendAllLines ( string path, IEnumerable contents, Encoding encoding ) : void
path string The file to append the lines to. The file is created if it does not already exist.
contents IEnumerable The lines to append to the file.
encoding System.Text.Encoding The character encoding to use.
return void
        public void AppendAllLines(string path, IEnumerable<string> contents, Encoding encoding)
        {
            CheckDisposed();

            if (contents == null)
                throw new ArgumentNullException("contents");

            using (var stream = AppendText(path, encoding))
            {
                foreach (var line in contents)
                {
                    stream.WriteLine(line);
                }
            }
        }

Same methods

SftpClient::AppendAllLines ( string path, IEnumerable contents ) : void