writeText


Description:

public static bool writeText (Path path, string text)

Writes a string to a file, replacing any existing content.

Example:

    var path = new Path ("/tmp/output.txt");
bool ok = Files.writeText (path, "Hello, World!");

Parameters:

path

path to the file.

text

the string to write.

Returns:

true if write succeeded, false otherwise.