Click or drag to resize

FileAppendTextTransacted Method (KernelTransaction, String, Encoding, PathFormat)

[AlphaFS] Creates a StreamWriter that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.

Namespace:  Alphaleonis.Win32.Filesystem
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax
public static StreamWriter AppendTextTransacted(
	KernelTransaction transaction,
	string path,
	Encoding encoding,
	PathFormat pathFormat
)

Parameters

transaction
Type: Alphaleonis.Win32.FilesystemKernelTransaction
The transaction.
path
Type: SystemString
The path to the file to append to.
encoding
Type: System.TextEncoding
The character Encoding to use.
pathFormat
Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).

Return Value

Type: StreamWriter
A stream writer that appends UTF-8 encoded text to the specified file or to a new file.
Exceptions
ExceptionCondition
ArgumentExceptionpath is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.
ArgumentNullExceptionpath is null.
DirectoryNotFoundExceptionThe specified path is invalid (for example, the directory doesn’t exist or it is on an unmapped drive).
NotSupportedExceptionpath is in an invalid format.
UnauthorizedAccessExceptionThe caller does not have the required permission.
See Also