Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
Parameters
- path
- Type:
System String
The file to write to.
- contents
- Type:
System String
The string to write to the file.
- encoding
- Type:
System.Text Encoding
The encoding to apply to the string.
Exceptions
| Exception | Condition |
|---|---|
| path is null. |
See Also