FileWriteAllText Method (KernelTransaction, String, String, Encoding) |
[AlphaFS] Creates a new file as part of a transaction, 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: Alphaleonis.Win32.FilesystemAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static void WriteAllText(
KernelTransaction transaction,
string path,
string contents,
Encoding encoding
)
Public Shared Sub WriteAllText (
transaction As KernelTransaction,
path As String,
contents As String,
encoding As Encoding
)
public:
static void WriteAllText(
KernelTransaction^ transaction,
String^ path,
String^ contents,
Encoding^ encoding
)
static member WriteAllText :
transaction : KernelTransaction *
path : string *
contents : string *
encoding : Encoding -> unit
Parameters
- transaction
- Type: Alphaleonis.Win32.FilesystemKernelTransaction
The transaction. - path
- Type: SystemString
The file to write to. - contents
- Type: SystemString
The string to write to the file. - encoding
- Type: System.TextEncoding
The Encoding applied to the contents of the file.
Exceptions See Also