FileWriteAllLines Method (String, IEnumerableString, Encoding, PathFormat) |
[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax public static void WriteAllLines(
string path,
IEnumerable<string> contents,
Encoding encoding,
PathFormat pathFormat
)
Public Shared Sub WriteAllLines (
path As String,
contents As IEnumerable(Of String),
encoding As Encoding,
pathFormat As PathFormat
)
public:
static void WriteAllLines(
String^ path,
IEnumerable<String^>^ contents,
Encoding^ encoding,
PathFormat pathFormat
)
static member WriteAllLines :
path : string *
contents : IEnumerable<string> *
encoding : Encoding *
pathFormat : PathFormat -> unit
Parameters
- path
- Type: SystemString
The file to write to. - contents
- Type: System.Collections.GenericIEnumerableString
The lines to write to the file. - encoding
- Type: System.TextEncoding
The character Encoding to use. - pathFormat
- Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).
Exceptions See Also