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

AppendAllLines() public method

Appends lines to a file, and closes the file.
isnull -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 ) : 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.
return void
        public void AppendAllLines(string path, IEnumerable<string> contents)
        {
            CheckDisposed();

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

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

Same methods

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