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

WriteAllLines() public method

Writes a collection of strings to the file using the UTF-8 encoding, and closes the file.

If the target file already exists, it is overwritten. It is not first truncated to zero bytes.

If the target file does not exist, it is created.

is null. Client is not connected. The method was called after the client was disposed.
public WriteAllLines ( string path, IEnumerable contents ) : void
path string The file to write to.
contents IEnumerable The lines to write to the file.
return void
        public void WriteAllLines(string path, IEnumerable<string> contents)
        {
            WriteAllLines(path, contents, Encoding.UTF8);
        }

Same methods

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