Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
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 open for reading.
- encoding
- Type:
System.Text Encoding
The encoding applied to the contents of the file.
Return Value
A string containing all lines of the file.Exceptions
| Exception | Condition |
|---|---|
| path is null. |
See Also