Easypt

clear

..Root.File.clear

Clears contents of opened file. Moves read position indicator to the begin of file.

Child of:

File

Signatures:

NativeCallable, Callable

Example:

import("file");

auto f.=(File());

f.open("a.txt");
f.clear();
f.write("Mad scientist.");

if (f.read().==("Mad").&&(f.readAll().==("Mad scientist.")), {
    log("Ok");
}, {
    log("Error");
})