RawFile.write

From Spheriki

Jump to: navigation, search

Write data to a RawFile.


Contents

Usage

rawfile.write(data);
  • rawfile Sphere RawFile object. The file to write the data to.
  • data Sphere ByteArray object. The data to be written.


Examples

The following sample code demonstrates creating and writing some text into a new file:

var rf = OpenRawFile("hello_world.txt", true);
rf.write(CreateByteArrayFromString("Hello world!"));
rf.close();


Notes

  • As in the example above, the file must be opened as writeable in order for this method to work.


See also

Personal tools