The following methods in **SftpClient** currently overwrite an existing file, but do not truncate it first: * public StreamWriter CreateText(string path) * public StreamWriter CreateText(string path, Encoding encoding) * public void WriteAllBytes(string path, byte[] bytes) * public void WriteAllLines(string path, IEnumerable<string> contents) * public void WriteAllLines(string path, string[] contents) * public void WriteAllLines(string path, IEnumerable<string> contents, Encoding encoding) * public void WriteAllLines(string path, string[] contents, Encoding encoding) * public void WriteAllText(string path, string contents) * public void WriteAllText(string path, string contents, Encoding encoding) The API has been "inspired" by [System.IO.File](https://msdn.microsoft.com/en-us/library/system.io.file.aspx), but the corresponding methods on [System.IO.File](https://msdn.microsoft.com/en-us/library/system.io.file.aspx) actually overwrite (and truncate) an existing file.