FileWriteAllText Method (String, String, PathFormat) |
[AlphaFS] Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax public static void WriteAllText(
string path,
string contents,
PathFormat pathFormat
)
Public Shared Sub WriteAllText (
path As String,
contents As String,
pathFormat As PathFormat
)
public:
static void WriteAllText(
String^ path,
String^ contents,
PathFormat pathFormat
)
static member WriteAllText :
path : string *
contents : string *
pathFormat : PathFormat -> unit
Parameters
- path
- Type: SystemString
The file to write to. - contents
- Type: SystemString
The string to write to the file. - pathFormat
- Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).
Exceptions Remarks This method uses UTF-8 encoding without a Byte-Order Mark (BOM)
See Also