void write(char[] name, void[] buffer)
|
This function writes buffer to name.
It can throw a FileException
Example:
import std.stdio;
import std.file;
int main(char[][] args)
{
try
{
write("test.txt","Hallo Welt!");
writefln("Successfully wrote file 'test.txt'");
}
catch (FileException xy)
{
writefln("A file exception occured: " ~ xy.toString());
}
catch (Exception xx)
{
writefln("An exception occured: " ~ xx.toString());
}
return 0;
}
|
See also:
FileException,
exists,
isfile,
read,
append
|