[File] write: [String] | Manual

[File] write: [String]

Writes content to a file. Send this message to a file object to write the entire contents of the specified string to the file in one go. The file object responds to this message for convience reasons, however for big files it might be a better idea to use the streaming API if possible (see readBytes etc.). data := '<xml>hello</xml>'. File new: 'myxml.xml', write: data. In the example above we write the XML snippet in variable data to a file called myxml.xml in the current working directory.

back to homepage
back to manual menu

This API reference guide has been generated automatically from source code comments using the shtml.ctr script.