FileIO.WriteTextAsync FileIO.WriteTextAsync FileIO.WriteTextAsync FileIO.WriteTextAsync FileIO.WriteTextAsync Method

Definition

Overloads

WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String)

Writes text to the specified file.

WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding)

Writes text to the specified file using the specified character encoding.

WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String) WriteTextAsync(IStorageFile, String)

Writes text to the specified file.

public : static IAsyncAction WriteTextAsync(IStorageFile file, Platform::String contents)
static IAsyncAction WriteTextAsync(IStorageFile file, winrt::hstring contents) const;
public static IAsyncAction WriteTextAsync(IStorageFile file, String contents)
Public Shared Function WriteTextAsync(file As IStorageFile, contents As String) As IAsyncAction
Windows.Storage.FileIO.writeTextAsync(file, contents).done( /* Your success and error handlers */ );

Parameters

file
IStorageFile IStorageFile IStorageFile

The file that the text is written to.

contents
String String String

The text to write.

Returns

No object or value is returned when this method completes.

Remarks

This method attempts to automatically detect the encoding of a file based on the presence of byte order marks. If an encoding cannot be detected, the encoding specified by the caller is used.

See Also

WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding) WriteTextAsync(IStorageFile, String, UnicodeEncoding)

Writes text to the specified file using the specified character encoding.

public : static IAsyncAction WriteTextAsync(IStorageFile file, Platform::String contents, UnicodeEncoding encoding)
static IAsyncAction WriteTextAsync(IStorageFile file, winrt::hstring contents, UnicodeEncoding encoding) const;
public static IAsyncAction WriteTextAsync(IStorageFile file, String contents, UnicodeEncoding encoding)
Public Shared Function WriteTextAsync(file As IStorageFile, contents As String, encoding As UnicodeEncoding) As IAsyncAction
Windows.Storage.FileIO.writeTextAsync(file, contents, encoding).done( /* Your success and error handlers */ );

Parameters

file
IStorageFile IStorageFile IStorageFile

The file that the text is written to.

contents
String String String

The text to write.

encoding
UnicodeEncoding UnicodeEncoding UnicodeEncoding

The character encoding of the file.

Returns

No object or value is returned when this method completes.

See Also