Share via


ReparsePointAware.WriteAllText(String, String) Method

Definition

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. If the file's canonical path contains Windows Reparse Points, UnauthorizedAccessException is thrown and nothing is written.

public static void WriteAllText (string path, string contents);
static member WriteAllText : string * string -> unit
Public Shared Sub WriteAllText (path As String, contents As String)

Parameters

path
String

Full path to the target file.

contents
String

Contents to write to the file.

Exceptions

The path contains Windows Reparse Points or otherwise cannot be accessed.

Applies to