FileReadAllText Method (String, Encoding, PathFormat) |
[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
Namespace: Alphaleonis.Win32.FilesystemAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static string ReadAllText(
string path,
Encoding encoding,
PathFormat pathFormat
)
Public Shared Function ReadAllText (
path As String,
encoding As Encoding,
pathFormat As PathFormat
) As String
public:
static String^ ReadAllText(
String^ path,
Encoding^ encoding,
PathFormat pathFormat
)
static member ReadAllText :
path : string *
encoding : Encoding *
pathFormat : PathFormat -> string
Parameters
- path
- Type: SystemString
The file to open for reading. - encoding
- Type: System.TextEncoding
The Encoding applied to the contents of the file. - pathFormat
- Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).
Return Value
Type:
StringAll lines of the file.
See Also